<?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 Issues with Batch Mode Execution and Table Locking in SAS Environment in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Issues-with-Batch-Mode-Execution-and-Table-Locking-in-SAS/m-p/929965#M365891</link>
    <description>&lt;P&gt;From a server different from the SAS machine, we are running processes in batch mode on the SAS machine. These processes (process.sas) essentially create, delete, and regenerate a table in a library from an .egp file. In some cases, when we run the process outside of business hours, it executes in batch mode without issues. However, on certain occasions when we execute it during business hours, we have encountered situations where the table intended for deletion and regeneration is locked, possibly due to a user accessing it. This results in an error, but we cannot determine if the execution completed successfully or failed from the batch mode call.&lt;/P&gt;&lt;P&gt;To make the call, we use a command like the following example:&lt;/P&gt;&lt;P&gt;```sh&lt;BR /&gt;"/sas/config/Lev1/SASApp/BatchServer/sasbatch.sh -logconfigloc \"/sas/config/Lev1/SASApp/BatchServer/logconfig.xml\" -log /sas/config/Lev1/SASApp/BatchServer/Logs/"$1"_ -batch -noterminal -logparm \"rollover=session\" -sysin /sas/config/Lev1/SASApp/SASEnvironment/SASCode/Jobs/"$1""&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;We make this call from another server, not the SAS machine, using an SSH connection.&lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2024 10:09:13 GMT</pubDate>
    <dc:creator>RaulME</dc:creator>
    <dc:date>2024-05-28T10:09:13Z</dc:date>
    <item>
      <title>Issues with Batch Mode Execution and Table Locking in SAS Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issues-with-Batch-Mode-Execution-and-Table-Locking-in-SAS/m-p/929965#M365891</link>
      <description>&lt;P&gt;From a server different from the SAS machine, we are running processes in batch mode on the SAS machine. These processes (process.sas) essentially create, delete, and regenerate a table in a library from an .egp file. In some cases, when we run the process outside of business hours, it executes in batch mode without issues. However, on certain occasions when we execute it during business hours, we have encountered situations where the table intended for deletion and regeneration is locked, possibly due to a user accessing it. This results in an error, but we cannot determine if the execution completed successfully or failed from the batch mode call.&lt;/P&gt;&lt;P&gt;To make the call, we use a command like the following example:&lt;/P&gt;&lt;P&gt;```sh&lt;BR /&gt;"/sas/config/Lev1/SASApp/BatchServer/sasbatch.sh -logconfigloc \"/sas/config/Lev1/SASApp/BatchServer/logconfig.xml\" -log /sas/config/Lev1/SASApp/BatchServer/Logs/"$1"_ -batch -noterminal -logparm \"rollover=session\" -sysin /sas/config/Lev1/SASApp/SASEnvironment/SASCode/Jobs/"$1""&lt;BR /&gt;```&lt;/P&gt;&lt;P&gt;We make this call from another server, not the SAS machine, using an SSH connection.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 10:09:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issues-with-Batch-Mode-Execution-and-Table-Locking-in-SAS/m-p/929965#M365891</guid>
      <dc:creator>RaulME</dc:creator>
      <dc:date>2024-05-28T10:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with Batch Mode Execution and Table Locking in SAS Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issues-with-Batch-Mode-Execution-and-Table-Locking-in-SAS/m-p/929967#M365893</link>
      <description>&lt;P&gt;When a SAS process ends in error, it usually leave your a return code, unless someone specifically coded around it.&lt;/P&gt;
&lt;P&gt;What does the log say?&lt;/P&gt;
&lt;P&gt;Not sure how an egp (Enterprise Guide project) comes into the picture in this scenario.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 12:01:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issues-with-Batch-Mode-Execution-and-Table-Locking-in-SAS/m-p/929967#M365893</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2024-05-28T12:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with Batch Mode Execution and Table Locking in SAS Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Issues-with-Batch-Mode-Execution-and-Table-Locking-in-SAS/m-p/929976#M365895</link>
      <description>&lt;P&gt;Follow my last footnote to find ways to avoid the locking issue altogether.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The exit code of a process can be retrieved on UNIX with $?, so you can store that in a variable of your shell script. If you use this to exit on the remi'ote, non-SAS server, the scheduler can react to it.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2024 13:17:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Issues-with-Batch-Mode-Execution-and-Table-Locking-in-SAS/m-p/929976#M365895</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-05-28T13:17:38Z</dc:date>
    </item>
  </channel>
</rss>

