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?
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?
What does your code do? Can you show us the code (if it's not too long)?
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 ;
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.
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!
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?
we do by right click on program, then it will gives the option for batch mode.
this worked. Thanks
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.