I have a following Macro which I am calling with in another Macro to write down observations via PROC Tabulate in to the PDS member however what happening is even if we don't have any observation to write down in the proc tabulate it's creating a ***Blank*** member in the PDS dataset ...
Does anybody know way to supress even member creation in the PDS dataset if there's no observacation written via Proc tabulate ????
%macro htmlout(objtype=,filename=,odsmem=,title=) ;
ods trace on;
ods noproctitle;
ods listing close ;
ods &Objtype
path=&filename
Base="xxxxxx"
body="&odsmem"
record_seperator=none
style=barrettsblue
newfile=page;
%mend htmlout ;
There are many that have asked for giving information there is nothing to print. The reason is you know the program has run (that is also some information) but no results are output.
Do you not want to run anyting you could test there are non-zero observations (nobs) and than not run that code. Remember to delete all previous run results first.
I found the answer did check for the Observation and put the PROC Tabulate within IF DO loop to check if OBS > 0 if so only then execute else exit....that worked...
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.