Getting error in the log: "Expecting ;. The symbol is not recognized and will be ignored". If I comment out compute discharge date section in the compute block, the error does not show. I am attempting to traffic light so if there is a hospital admission date, then we should also have a discharge date. Similarly, if we have a discharge date, we should have an admission date. I don't see where I'm missing a semi-colon. I have seen SAS throw errors that are not applicable before though.
Error when running this:
proc report data=Cohortb1_2022Q3Q4;
columns
record_number
admission_date
discharge_date;
define admission_date / Display 'Admission Date To Diagnostic Facility';
define discharge_date / Display 'Discharge Date From Diagnostic Facility';
define record_number / 'Record Number';
compute admission_date;
if admission_date = . and discharge_date ne .
then call define(_col_,'style','style={background=red})');
endcomp;
compute discharge_date;
if admission_date ne . and discharge_date = .
then call define(_col_,'style','style={background=red})');
endcomp;
run;
No error when commenting out compute discharge date section:
proc report data=Cohortb1_2022Q3Q4;
columns
record_number
admission_date
discharge_date;
define admission_date / Display 'Admission Date To Diagnostic Facility';
define discharge_date / Display 'Discharge Date From Diagnostic Facility';
define record_number / 'Record Number';
compute admission_date;
if admission_date = . and discharge_date ne .
then call define(_col_,'style','style={background=red})');
endcomp;
/*compute discharge_date;*/
/* if admission_date ne . and discharge_date = .*/
/* then call define(_col_,'style','style={background=red})');*/
/*endcomp;*/
run;
... View more