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

Hello,

I have asked my manager to create a new sub environment on the development server.

I have run a SAS program using the options mprint mlogic source2; and the only things that I see into the log file is some warning.

 

Usually, for  this kind of message (warning) we are suppose to get done(1) instead of exit 1.

 

Any idea how to solve that kind of issue  or to bring the system behaviour as it was before

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

I get the impression that you are running this program as a batch job. If that is true and you are using the sasbatch script file then you need to ensure that line checking for a return code of 1 is as shown in this version:

@echo off
REM /*--------------------------------------------------------------------\
REM |                                                                     |
REM | Script for managing the SAS DATA Step Batch Server                  |
REM |                                                                     |
REM \--------------------------------------------------------------------*/

REM Define needed environment variables
call "%~dp0..\appservercontext_env.bat"
call "%APPSERVER_ROOT%\BatchServer\sasbatch_usermods.bat"

Set CONFIGDIR=%APPSERVER_ROOT%\BatchServer
if not {"%username%"}=={""} (
Set CMD_OPTIONS=-noxwait -noxcmd -lrecl 32767 -config "%CONFIGDIR%\sasv9.cfg" -sasinitialfolder "%APPSERVER_ROOT%" %USERMODS_OPTIONS%
) else (
Set CMD_OPTIONS=-sasuser work -noxwait -noxcmd -lrecl 32767 -config "%CONFIGDIR%\sasv9.cfg" -sasinitialfolder "%APPSERVER_ROOT%" %USERMODS_OPTIONS%
)

"%SAS_COMMAND%" %CMD_OPTIONS% %*%
REM remove the REM from the statements below to capture exit=1 (SAS warning) and make it exit=0
set rc=%ERRORLEVEL% 
if %rc%==1 goto makenormalexit 
exit /b %rc% 
:makenormalexit 
exit /b 0 

 

 

View solution in original post

2 REPLIES 2
ballardw
Super User

As a minimum show the log with the "some warning" and the code that generates the warning.

 

Since you mention setting macro debug options then you may have to investigate the macro code. If a macro is defined with the SECURE option you may have difficulty getting the debug options to work.

SASKiwi
PROC Star

I get the impression that you are running this program as a batch job. If that is true and you are using the sasbatch script file then you need to ensure that line checking for a return code of 1 is as shown in this version:

@echo off
REM /*--------------------------------------------------------------------\
REM |                                                                     |
REM | Script for managing the SAS DATA Step Batch Server                  |
REM |                                                                     |
REM \--------------------------------------------------------------------*/

REM Define needed environment variables
call "%~dp0..\appservercontext_env.bat"
call "%APPSERVER_ROOT%\BatchServer\sasbatch_usermods.bat"

Set CONFIGDIR=%APPSERVER_ROOT%\BatchServer
if not {"%username%"}=={""} (
Set CMD_OPTIONS=-noxwait -noxcmd -lrecl 32767 -config "%CONFIGDIR%\sasv9.cfg" -sasinitialfolder "%APPSERVER_ROOT%" %USERMODS_OPTIONS%
) else (
Set CMD_OPTIONS=-sasuser work -noxwait -noxcmd -lrecl 32767 -config "%CONFIGDIR%\sasv9.cfg" -sasinitialfolder "%APPSERVER_ROOT%" %USERMODS_OPTIONS%
)

"%SAS_COMMAND%" %CMD_OPTIONS% %*%
REM remove the REM from the statements below to capture exit=1 (SAS warning) and make it exit=0
set rc=%ERRORLEVEL% 
if %rc%==1 goto makenormalexit 
exit /b %rc% 
:makenormalexit 
exit /b 0 

 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2 replies
  • 485 views
  • 0 likes
  • 3 in conversation