Sending the LOG and OUTPUT from PC SAS to a seperate file

This post was kindly contributed by StudySAS Blog - go there to comment and to read the full post.


Here is how to direct the SAS LOG file and or SAS Output  to a seperate file.

Approach 1: Using Display Manager Statements;

filename log ‘C:\temp\logfile.log’;

filename out ‘C:\temp\output.lst’;

*Select only male students and age less than 16;

proc sql;

create table males as

select age, height, weight

from sashelp.class

where sex=’M’ and age lt 16 

order by age;

quit;

*Get the descriptive statistics for height variable by age;

proc means data=males ;

by age;

var height;

output out=htstats mean=mean n=n std=sd median=med min=min max=max;

run;

DM ‘OUT;FILE OUT REP;’;

DM ‘LOG;FILE LOG REP;’;

Information about Display Manager Commands:

DEXPORT and DIMPORT: DISPLAY MANAGER commands used to IMPORT and EXPORT the Tab delimited (Excel and .CSV) files;

SAS Display Manager Commands

Approach 2: Using Proc PRINTTO procedure;

Refer:  How to save the log file or what is PROC PRINTTO procedure 

(‘’)

[[ This is a content summary only. Visit my website for full links, other content, and more! ]]

This post was kindly contributed by StudySAS Blog - go there to comment and to read the full post.