Open the ODS document MyDocument, list the entries, and view the table template that determines how the PROC STANDARD output will display. The PROC DOCUMENT statement with the NAME= option specified opens the ODS document WORK.MyDocument. The LIST statement with the LEVELS=ALL option lists detailed information on all levels of the document WORK.MyDocument. The BYGROUPS option creates columns in the list statement output for BY group information. The names of the columns with the BY group information are the names of the BY variables, Section and Student. To see what the output will look like if you omit the BYGROUPS option, see Listing of WORK.MyDocument without the BYGROUPS Option Specified. The OBTEMPL statement writes the table template that is associated with the output object Standard#1 to the listing destination. The ODS DOCUMENT CLOSE statement closes the DOCUMENT destination. If the DOCUMENT destination is not closed, no DOCUMENT procedure output can be viewed.


Note:   If you omit LEVELS=ALL, then no entry list will be created. This is because ODS cannot find any BY groups at the directory level and only BY groups are listed when the BYGROUPS option is specified   [cautionend]


ods listing;
proc document name=mydocument;
   list/ levels=all bygroups;
   obtempl \Standard#1\ByGroup1#1\Standard#1; 
run;