Posts

Showing posts with the label DM Commands

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

Image
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 procedur...

SAS Display Manager Commands

In my view, Display Manager commands didn’t get much attention of SAS programmers as they should be. It may be because... 1) SAS Documentation has very little information about how to use this facility. 2) Even Google searches aren’t helpful enough. Here is the list of Display Manager Commands I know… dm "log; clear; out; clear;" ; *Clears Output and Log Window; dm " vt work.dsn" ; *Opens the dataset DSN in a View table window; dm "vt &syslast" ; *Opens the dataset recently created; dm 'next viewtable:work.dsn; end; ' ; *Closes the VT window of DSN; dm 'keydef f12 submit' ; *Assigns the submit command to the F12 key ; *Assigns clear log and output commands to F2 Key; dm "keydef F2 'cle log; cle output; submit'" ; *applies detail view to explorer window; dm   "next explorer; detail" ; dm "next log; detail" ; *Opens the Log Window; dm "next output; detail" ; *Open...