Did you inherit code that was written eons ago? Do you find old programs to copy the PROC REPORT code and then simply change the variable names for your new program? Have you wondered what all of those options do? Do you ever send output to the Listing destination (the Output Window) anymore?
If you said yes to any of the questions above -- clean it up! PROC REPORT has been around forever, but it has changed and evolved over the years to facilitate the creation of nicer looking output, specifically in non-Listing ODS destinations.
There are a number of options that are only valid in the Listing destination. Do you really need them? If you aren’t using that destination, then remove any outdated options from your SAS programs. Here’s a list by statement in the REPORT procedure:
PROC REPORT statement: outdated options
BOX | NOWD/NOFS * |
COLWIDTH= | PANELS= |
FORMCHAR= | PS= |
HEADLINE | PSPACE= |
HEADSKIP | SPACING= |
LS= | WRAP |
* Nonwindowing mode became default in 9.4.
DEFINE statement: outdated options
CENTER * | RIGHT * |
FLOW | SPACING= |
LEFT * | WIDTH= ** |
* In the Listing destination the LEFT, RIGHT, and CENTER options change the justification of both the headers and the data. In other ODS destinations these options change only the justification for the data. Instead of these options, it is highly recommended that you use the JUST= attribute within STYLE(COLUMN)= and STYLE(HEADER)= to change the justification.
** The standalone WIDTH= option is for Listing. WIDTH= within a style specification, like STYLE(COLUMN)=[WIDTH=1IN], is for other ODS destinations.
BREAK statement: outdated options
DOL | SKIP |
DUL | UL |
OL |
RBREAK statement: outdated options
DOL | SKIP |
DUL | UL |
OL |
You can leave these options in, but why? Make your PROC REPORT code more readable for yourself and anyone else who picks it up.
2 Comments
Alice,
I do not recommend removing these options from old programs because the task might be time consuming and unnecessary because the programs have already created the needed output. My advice is to not include the options that only effect Listing output in any program you write going forward.
Jane
Jane,
Can you advise how these outdated options can be cleaned up?
Thanks,
Alice