<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: exit 1 code instead of done in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/exit-1-code-instead-of-done/m-p/882736#M43239</link>
    <description>&lt;P&gt;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:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;@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 &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Jun 2023 04:54:28 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2023-06-28T04:54:28Z</dc:date>
    <item>
      <title>exit 1 code instead of done</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/exit-1-code-instead-of-done/m-p/881938#M43200</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have asked my manager to create a new sub environment on the development server.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Usually, for&amp;nbsp; this kind of message (warning) we are suppose to get done(1) instead of exit 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea how to solve that kind of issue&amp;nbsp; or to bring the system behaviour as it was before&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 16:03:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/exit-1-code-instead-of-done/m-p/881938#M43200</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2023-06-22T16:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: exit 1 code instead of done</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/exit-1-code-instead-of-done/m-p/881960#M43201</link>
      <description>&lt;P&gt;As a minimum show the log with the "some warning" and the code that generates the warning.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 21:02:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/exit-1-code-instead-of-done/m-p/881960#M43201</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-06-22T21:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: exit 1 code instead of done</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/exit-1-code-instead-of-done/m-p/882736#M43239</link>
      <description>&lt;P&gt;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:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;@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 &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2023 04:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/exit-1-code-instead-of-done/m-p/882736#M43239</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-06-28T04:54:28Z</dc:date>
    </item>
  </channel>
</rss>

