Hi, I am unsure if there is a limitation to proc format that I am not considering, but my proc format is only formatting part of the data. Below is the macro I'm running in SAS 9.4: %macro readmit(indata, outdata);
proc format;
value $&outdata._event_name_ readmission_1_arm_1='Readmit 1' readmission_2_arm_1='Readmit 2' readmission_3_arm_1='Readmit 3'
readmission_4_arm_1='Readmit 4' readmission_5_arm_1='Readmit 5' readmission_6_arm_1='Readmit 6' readmission_7_arm_1='Readmit 7'
readmission_8_arm_1='Readmit 8' readmission_9_arm_1='Readmit 9' readmission_10_arm_1='Readmit 10' readmission_11_arm_1='Readmit 11'
readmission_12_arm_1='Readmit 12' readmission_13_arm_1='Readmit 13' readmission_14_arm_1='Readmit 14' readmission_15_arm_1='Readmit 15'
readmission_16_arm_1='Readmit 16' readmission_17_arm_1='Readmit 17' readmission_18_arm_1='Readmit 18' readmission_19_arm_1='Readmit 19'
readmission_20_arm_1='Readmit 20' readmission_21_arm_1='Readmit 21' readmission_22_arm_1='Readmit 22' readmission_23_arm_1='Readmit 23'
readmission_24_arm_1='Readmit 24' readmission_25_arm_1='Readmit 25' readmission_26_arm_1='Readmit 26' readmission_27_arm_1='Readmit 27'
readmission_28_arm_1='Readmit 28' readmission_29_arm_1='Readmit 29' readmission_30_arm_1='Readmit 30';
run;
data &outdata.;
set &indata.;
format &outdata._event_name &outdata._event_name_.;
run;
%mend;
%readmit(readmissions, readmit); While readmissions 1-20 (readmission_1_arm_1 - readmission_20_arm_1) are formatted correctly to Readmit 1 - Readmit 20, the formatting is not being applied to readmissions 21+ (readmission_21_arm_1 - readmission_30_arm_1). These later ones are formated as readmissio. Thanks in advance!
... View more