- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
What does your code do? Can you show us the code (if it's not too long)?
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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 ;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
we do by right click on program, then it will gives the option for batch mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
this worked. Thanks