12-02-2014 10:04 AM
This is with regard DM command, i use the DM command to clear the log and output before the execution of program, something like below
dm 'clear log;clear output';
this clears the log and output content when executed in the sas interactive mode. However when the same code is executed in unix/linux sas batch submission it does not work.
could you please let me know if there is any way to make this dm command work in unix sas batch submission or if there is any alternative code for them in unix sas.
Any suggestions are appreciated.
12-02-2014 10:37 AM
I'm kind of confused. The DM commands are intended for use with the Display Manager, i.e. interactive mode. Since true batch mode is generally run without the DM what would you actually be clearing?
If this related to saving only some of the generated output you may look into PROC PRINTTO and routing desired output.
12-02-2014 11:01 AM
i want to clear output generated by some procedure with the next procedure in the output lst file.
For example, consider that we have two print procedures, if submitted in a single code one followed by other. Both, data of air and class will be printed in the output. i wish to clear the output printed by air , so that in the output lst file only output of class will be there.
proc print data=sashelp.air;
proc print data=sashelp.class;
12-02-2014 11:09 AM
If you don't want the output, don't put in the print procedure? The point being is you have told SAS to print data twice, without specifying and output destination, hence SAS defaults to printing twice to the batch output file. So either don't print both or re-direct the output via proc printto as ballardw has mentioned.
To add, there is a difference in operation. Interactive is more of a debug environment, run individual steps, clearing things etc. where batch is a case of take whole program, run everything, any log goes to the default log file, any output goes to the default output file - unless you actually tell it not to.