Features: |
PROC DOCUMENT statement option: NAME= IMPORT statement option: TEXTFILE= LIST statement REPLAY statement
|
ODS destinations: | DOCUMENT
HTML LISTING |
options nodate nostimer LS=80 PS=60; title1 'Importing a SAS Program and LISTING Output';
data one; do month = 1 to 12; age = 2 + 0.3*rannor(345467); age2 = 3 + 0.3*rannor(345467); age3 = 4 + 0.4*rannor(345467); output; end; run;
ods listing file="your-file-path/odsglm.lst";
proc glm; class month; model age age2 age3=month / nouni; manova h=month /printe; run; quit;
data plants; input type $ @; do block=1 to 3; input stemleng @; output; end; datalines; clarion 32.7 32.3 31.5 clinton 32.1 29.7 29.1 knox 35.7 35.9 33.1 o'neill 36.0 34.2 31.2 compost 31.8 28.0 29.2 wabash 38.2 37.8 31.9 webster 32.5 31.1 29.7 ;
proc glm order=data; class type block; model stemleng=type block; means type; contrast 'compost vs others' type -1 -1 -1 -1 6 -1 -1; contrast 'river soils vs.non' type -1 -1 -1 -1 0 5 -1, type -1 4 -1 -1 0 0 -1; contrast 'glacial vs drift' type -1 0 1 1 0 0 -1; contrast 'clarion vs webster' type -1 0 0 0 0 0 1; contrast 'knox vs oneill' type 0 0 1 -1 0 0 0; quit; ods listing close;
ods listing; proc document name=import(write); import textfile="your-file-path\odsglm.lst" to ^; import textfile="your-file-path\textfileExample.sas" to ^; list/details; run;
ods pdf file="out.pdf"; replay; run;
quit; ods pdf close;
data one; do month = 1 to 12; age = 2 + 0.3*rannor(345467); age2 = 3 + 0.3*rannor(345467); age3 = 4 + 0.4*rannor(345467); output; end; run;
data plants; input type $ @; do block=1 to 3; input stemleng @; output; end; datalines; clarion 32.7 32.3 31.5 clinton 32.1 29.7 29.1 knox 35.7 35.9 33.1 o'neill 36.0 34.2 31.2 compost 31.8 28.0 29.2 wabash 38.2 37.8 31.9 webster 32.5 31.1 29.7 ;
proc glm order=data; class type block; model stemleng=type block; means type; contrast 'compost vs others' type -1 -1 -1 -1 6 -1 -1; contrast 'river soils vs.non' type -1 -1 -1 -1 0 5 -1, type -1 4 -1 -1 0 0 -1; contrast 'glacial vs drift' type -1 0 1 1 0 0 -1; contrast 'clarion vs webster' type -1 0 0 0 0 0 1; contrast 'knox vs oneill' type 0 0 1 -1 0 0 0; quit; ods listing close;
ods listing; proc document name=import(write); import textfile="your-file-path\odsglm.lst" to ^; import textfile="your-file-path\textfileExample.sas" to ^; list/details; run;