Hi, I want to write a line in a report that is execute only is there is missing data. As an example below: New York does not report so I would like to print that in my report and not print anything is all sites report. I've gotten this far, but don't know how to produce the ods pdf text statement dynamically. ods pdf; data test_data; input site $30. ; cards; Dallas Ft Worth Cleveland Chicago ; run; data lookup; input facility $30. ; cards; Dallas Ft Worth Cleveland Chicago New York ; run; proc sql; create table WhoIsMissing as select a.site, b.facility from test_data as a right join lookup as b on a.site=b.facility; quit; /*put the name into a macro variable;*/ proc sql noprint; select facility into:missing from whoismissing where site=''; quit; %put &missing; /*If there is no value in the macro variable then do nothing.*/ /*if there is a data value in the macro variable the print it*/ /*stumped here on how to do this dynamically*/ /*Also not sure how to deal with two or more missing sites*/ Ods pdf text="^S={font=('Arial' ,12pt, bold ) just=center } Site &Missing is missing"; ods pdf close;
... View more