/* This program is to read in the SPARCS DRG data table. */ OPTIONS NOCENTER NODATE FORMDLIM=' ' compress=yes pagesize=50; /*USER INPUT NEEDED*/ %let file=".\SPARCS_Extract\SPARCS_DRG.dat"; *Set to your path; data SPARCS_DRG ; %let _EFIERR_ = 0; /* set the ERROR detection macro variable */ infile &file. delimiter = '|' MISSOVER DSD lrecl=32767 firstobs=2 /*obs = 1000*/; informat clm_trans_id $12. ; informat disch_yr $4. ; informat clm_type_cd $1. ; informat upide $128. ; informat cur_fed_drg_cd $3. ; informat cur_fed_mdc_cd $2. ; informat prev_fed_drg_cd $3. ; informat prev_fed_mdc_cd $2. ; informat next_fed_drg_cd $3. ; informat next_fed_mdc_cd $2. ; informat cur_ap_drg_cd $3. ; informat cur_ap_mdc_cd $2. ; informat prev_ap_drg_cd $3. ; informat prev_ap_mdc_cd $2. ; informat next_ap_drg_cd $3. ; informat next_ap_mdc_cd $2. ; informat cur_apr_drg_cd $3. ; informat cur_apr_mdc_cd $2. ; informat cur_apr_rom_cd $1. ; informat cur_apr_soi_cd $1. ; informat cur_apr_drg_poa $3. ; informat cur_apr_mdc_poa $2. ; informat cur_apr_rom_poa $1. ; informat cur_apr_soi_poa $1. ; informat prev_apr_drg_cd $3. ; informat prev_apr_mdc_cd $2. ; informat prev_apr_rom_cd $1. ; informat prev_apr_soi_cd $1. ; informat next_apr_drg_cd $3. ; informat next_apr_mdc_cd $2. ; informat next_apr_rom_cd $1. ; informat next_apr_soi_cd $1. ; informat clm_key $12. ; informat actv_flag $1. ; informat ltst_flag $1. ; informat processed_dt $8. ; informat created_by $20. ; informat last_updd_dt $8. ; informat last_updd_by $20. ; informat src_nm $30. ; informat insert_row_dt $8. ; informat abort_ind $1. ; informat hiv_ind $1. ; format clm_trans_id $12. ; format disch_yr $4. ; format clm_type_cd $1. ; format upide $128. ; format cur_fed_drg_cd $3. ; format cur_fed_mdc_cd $2. ; format prev_fed_drg_cd $3. ; format prev_fed_mdc_cd $2. ; format next_fed_drg_cd $3. ; format next_fed_mdc_cd $2. ; format cur_ap_drg_cd $3. ; format cur_ap_mdc_cd $2. ; format prev_ap_drg_cd $3. ; format prev_ap_mdc_cd $2. ; format next_ap_drg_cd $3. ; format next_ap_mdc_cd $2. ; format cur_apr_drg_cd $3. ; format cur_apr_mdc_cd $2. ; format cur_apr_rom_cd $1. ; format cur_apr_soi_cd $1. ; format cur_apr_drg_poa $3. ; format cur_apr_mdc_poa $2. ; format cur_apr_rom_poa $1. ; format cur_apr_soi_poa $1. ; format prev_apr_drg_cd $3. ; format prev_apr_mdc_cd $2. ; format prev_apr_rom_cd $1. ; format prev_apr_soi_cd $1. ; format next_apr_drg_cd $3. ; format next_apr_mdc_cd $2. ; format next_apr_rom_cd $1. ; format next_apr_soi_cd $1. ; format clm_key $12. ; format actv_flag $1. ; format ltst_flag $1. ; format processed_dt $8. ; format created_by $20. ; format last_updd_dt $8. ; format last_updd_by $20. ; format src_nm $30. ; format insert_row_dt $8. ; format abort_ind $1. ; format hiv_ind $1. ; input clm_trans_id $ disch_yr $ clm_type_cd $ upide $ cur_fed_drg_cd $ cur_fed_mdc_cd $ prev_fed_drg_cd $ prev_fed_mdc_cd $ next_fed_drg_cd $ next_fed_mdc_cd $ cur_ap_drg_cd $ cur_ap_mdc_cd $ prev_ap_drg_cd $ prev_ap_mdc_cd $ next_ap_drg_cd $ next_ap_mdc_cd $ cur_apr_drg_cd $ cur_apr_mdc_cd $ cur_apr_rom_cd $ cur_apr_soi_cd $ cur_apr_drg_poa $ cur_apr_mdc_poa $ cur_apr_rom_poa $ cur_apr_soi_poa $ prev_apr_drg_cd $ prev_apr_mdc_cd $ prev_apr_rom_cd $ prev_apr_soi_cd $ next_apr_drg_cd $ next_apr_mdc_cd $ next_apr_rom_cd $ next_apr_soi_cd $ clm_key $ actv_flag $ ltst_flag $ processed_dt $ created_by $ last_updd_dt $ last_updd_by $ src_nm $ insert_row_dt $ abort_ind $ hiv_ind $ ; if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */ run;