BookmarkSubscribeRSS Feed
Jagadishkatam
Amethyst | Level 16

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

Thanks,
Jag
3 REPLIES 3
ballardw
Super User

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.

Jagadishkatam
Amethyst | Level 16

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;

Thanks,
Jag
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2049 views
  • 0 likes
  • 3 in conversation