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
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
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.
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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.