Dear all,
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.
Thanks,
Jag
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.
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;
run;
proc print data=sashelp.class;
run;
Hi,
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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.