88 ,orientation=LANDSCAPE
92%local obsopt foot pagetxt odsopts prev_orient;
94%
if %index(&ds,.)=0 %then %let ds=WORK.&ds;
96%let pagenum=%upcase(&pagenum);
97%let orientation=%upcase(&orientation);
99%
if %sysfunc(exist(&ds))=0 %then %
do;
101 msg=Dataset &ds does not exist
107%
if %sysfunc(fileref(&outref)) > 0 %then %
do;
108 filename &outref temp;
112%
if %eval(&maxobs)>0 %then %let obsopt=(obs=&maxobs);
117%
if &pagenum=PAGE %then %let pagetxt=Page (*ESC*){thispage};
118%
else %
if &pagenum=PAGEOF %then
119 %let pagetxt=Page (*ESC*){thispage} of (*ESC*){lastpage};
122%
if %length(&pagetxt)>0 %then %
do;
123 %
if %length(&foot)>0 %then %let foot=&foot &pagetxt;
124 %
else %let foot=&pagetxt;
128%
if %length(&options)>0 %then %let odsopts=&odsopts &options;
130%let prev_orient=%sysfunc(getoption(orientation));
131options orientation=&orientation;
133ods pdf file=&outref &odsopts
134 %
if %length(&style)>0 %then style=&style;;
139%
if %length(&title)>0 %then %
do;
142%
if %length(&foot)>0 %then %
do;
146proc print data=&ds&obsopt noobs;
147 %
if %length(&by)>0 %then %
do;
155options orientation=&prev_orient;