BookmarkSubscribeRSS Feed

The table of contents output in the ODS HTML and PDF destinations is a hierarchical tree structure. Every procedure starts at the top level and may include several sub-levels. BY-processing adds a level. Some SAS/STAT procedures can produce many levels.


Repeats can be done with BY-processing this is fine: the contents are indented. If BY-processing is not possible, e.g. when using multiple procedures, all the contents headings will be "flat" at the top level and the repeat is difficult to see.


I would like to be able to control the level of indent in the table of contents. I know this can be done with PROC DOCUMENT but this is way too complex for a very simple requirement.


I propose adding a simple ODS statement ODS PROCINDENT=number; where number=0 represents no indent. Because of the way ODS outputs, it may be necessary to use the command before a  procedure to take effect after it. As an example:

ods procindent=1;
ods proclabel='Section 1';
proc print data=intro(where=(s=1)) description='Introduction'; run;
proc glm data=cars; ... quit;
ods procindent=0;
proc plm restore=mystore; ... run;

ods procindent=1;
ods proclabel='Section 2';
proc print data=intro(where=(s=2)) description='Introduction'; run;
... etc ...

This would have the effect of indenting the output of PROC GLM and PROC PLM under PROC PRINT.