BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
SASuserlot
Barite | Level 11

I am not sure, this question can be asked here. I am running a table program in batch mode. Unfortunately I am getting this message. I am not sure What causing the message. Any suggestions or what causing the issue?

SASuserlot_0-1625755254866.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

DM commands are most likely the source of that message.  If you are using a recent release of SAS you can wrap those lines in %IF code to prevent them from running when DMS is not active.

%if %sysfunc(getoption(dms))=DMS %then %do;
  DM "CLEAR LOG";
  DM "CLEAR OUTPUT";
  DM 'ODSRESULTS; CLEAR'
%end;

When I run SAS programs I type the command sas followed by the filename.

sas myfile.sas

How did you run the "batch" mode job on your machine?  Did you click on something? What?

View solution in original post

7 REPLIES 7
PaigeMiller
Diamond | Level 26

What does your code do? Can you show us the code (if it's not too long)?

--
Paige Miller
SASuserlot
Barite | Level 11

Unfortunately its long code,  However, Most of the code is general code ( set, merge, transpose, freq, sql) which is not affecting ( unfortunately its long code can submit everything here). But I have the code to clear  the output, log, ods results, kill datasets. using DM statements is this affecting?

DM "CLEAR LOG";
DM "CLEAR OUTPUT";
DM 'ODSRESULTS; CLEAR';
PROC DATASETS LIB=WORK MEMTYPE = DATA KILL NOLIST; QUIT;
OPTIONS NOFMTERR ERRORS=2 MISSING=' ' MSGLEVEL=I  VALIDVARNAME=UPCASE ;
Tom
Super User Tom
Super User

Is your code trying to run any Display Manager commands by using the DM statement?

Is it trying to use an WINDOW or %WINDOW commands to open an pop-up window to the user?

 

Looks like you are not just running in "batch" mode but also also running without DMS.

Please show the operating system command you used to run the SAS program.

SASuserlot
Barite | Level 11

You are  right I am writing code using dm statement.

DM "CLEAR LOG";
DM "CLEAR OUTPUT";
DM 'ODSRESULTS; CLEAR';
PROC DATASETS LIB=WORK MEMTYPE = DATA KILL NOLIST; QUIT;
OPTIONS NOFMTERR ERRORS=2 MISSING=' ' MSGLEVEL=I  VALIDVARNAME=UPCASE ;

I really don't know how to show this "Please show the operating system command you used to run the SAS program". I really appreciate if you can guide me how to get this information!

Tom
Super User Tom
Super User

DM commands are most likely the source of that message.  If you are using a recent release of SAS you can wrap those lines in %IF code to prevent them from running when DMS is not active.

%if %sysfunc(getoption(dms))=DMS %then %do;
  DM "CLEAR LOG";
  DM "CLEAR OUTPUT";
  DM 'ODSRESULTS; CLEAR'
%end;

When I run SAS programs I type the command sas followed by the filename.

sas myfile.sas

How did you run the "batch" mode job on your machine?  Did you click on something? What?

SASuserlot
Barite | Level 11

we do  by right click on program, then it will gives the option for batch mode.

SASuserlot_0-1625771768670.png

 

SASuserlot
Barite | Level 11

this worked. Thanks

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 1371 views
  • 0 likes
  • 3 in conversation