, , , , proc document
. , , , .
proc document
, . , freq, - SAS title
, . , PROC FREQ run
, ( , titel1/2/3/4 - title
, ).
, ( , , PROC FREQ, ). :
*ODS DOCUMENT creates the DOCUMENT object you will later modify;
ods document name=freqs(write);
** SINGLE PASS ON PROC FREQ **;
PROC FREQ DATA = TEST;
TITLE "TEMPERATURE FREQS";
TABLE TEMPERATURE / LIST OUT=FREQS_TEMP;
TITLE "HUMIDITY FREQS";
TABLE HUMIDITY / LIST OUT=FREQS_HUM;
TITLE "PLATE FREQS";
TABLE PLATE / LIST OUT=FREQS_PLATE;
TITLE "FORM FREQS";
TABLE FORM / LIST OUT=FREQS_FORM;
RUN;
title;
ods document close;
*PROC DOCUMENT is an interactive proc, so it stays active until QUIT;
proc document name=freqs;
*Just a look at what it looks like under the hood - can be removed in production;
list/levels=all;
run;
*Here we create page breaks (OBPAGE command) after each table.;
obpage \Freq#1\Table1#1\OneWayFreqs#1 /after;
obpage \Freq#1\Table2#1\OneWayFreqs#1 /after;
obpage \Freq#1\Table3#1\OneWayFreqs#1 /after;
*Here we add the titles.;
obtitle \Freq#1\Table1#1\OneWayFreqs#1 "TEMPERATURE FREQS";
obtitle \Freq#1\Table2#1\OneWayFreqs#1 "HUMIDITY FREQS";
obtitle \Freq#1\Table3#1\OneWayFreqs#1 "PLATE FREQS";
obtitle \Freq#1\Table4#1\OneWayFreqs#1 "FORM FREQS";
*And here we replay the document with the changes;
replay ^;
run;
quit;