<?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: Getting LSF runtime attributes while running a scheduled batch flow/job in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Getting-LSF-runtime-attributes-while-running-a-scheduled-batch/m-p/902352#M356594</link>
    <description>&lt;P&gt;Thank you very much. This is exacly the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
    <pubDate>Thu, 09 Nov 2023 16:13:21 GMT</pubDate>
    <dc:creator>macrobo</dc:creator>
    <dc:date>2023-11-09T16:13:21Z</dc:date>
    <item>
      <title>Getting LSF runtime attributes while running a scheduled batch flow/job</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-LSF-runtime-attributes-while-running-a-scheduled-batch/m-p/901877#M356393</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;we are using LSF and Automic schedulers in 2 different SAS 9.4 DI environments.&lt;/P&gt;&lt;P&gt;In the environment using Automic it is possible to get some Automic Runtime attributes form automatic macro variables created while running a batch job:&lt;/P&gt;&lt;P&gt;run_id = %sysget(AUTOMIC_RUN_ID);&lt;BR /&gt;load_id = %sysget(AUTOMIC_LOAD_ID);&lt;BR /&gt;load_name = %sysget(AUTOMIC_LOAD_NAME);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Is there a possibility to get Runtime attributes while running a flow/job scheduled with LSF as automatic macro variables?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LSF Runtime Attibutes" style="width: 457px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89482iD0642668704E6E67/image-size/large?v=v2&amp;amp;px=999" role="button" title="LSF Runtime Attibutes.jpg" alt="LSF Runtime Attibutes" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;LSF Runtime Attibutes&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any suggestions or other ideas? Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Robert&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 12:52:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-LSF-runtime-attributes-while-running-a-scheduled-batch/m-p/901877#M356393</guid>
      <dc:creator>macrobo</dc:creator>
      <dc:date>2023-11-07T12:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Getting LSF runtime attributes while running a scheduled batch flow/job</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-LSF-runtime-attributes-while-running-a-scheduled-batch/m-p/901899#M356400</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/29847"&gt;@macrobo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is possible in LSF too. We use the following code, which is a snippet from a macro that is executed at start of every batchjob.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%* collect information from actual job running under LSF;
%let ExecutionServer = %lowcase(&amp;amp;syshostname).odknet.dk;
%let ProcessID = &amp;amp;sysJobID;
%let LSB_UserID = %upcase(&amp;amp;sysuserid);
%let LSB_SourceFile = %sysfunc(getoption(sysin));
%let LSB_JobName = %sysget(LSB_JOBNAME);
%let LSB_flow = %scan(&amp;amp;LSB_JobName,3,%str(:));
%let LSB_FlowID = %scan(&amp;amp;LSB_JobName,1,%str(:));
%let LSB_Job = %scan(%scan(&amp;amp;LSB_JobName,4,%str(:)),1,%str({));
%let LSB_JobID = %sysget(LSB_JOBID);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that not all values are from LSF, but are collected here to come in the same "group" og macro variables for further use.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 15:36:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-LSF-runtime-attributes-while-running-a-scheduled-batch/m-p/901899#M356400</guid>
      <dc:creator>ErikLund_Jensen</dc:creator>
      <dc:date>2023-11-07T15:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Getting LSF runtime attributes while running a scheduled batch flow/job</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Getting-LSF-runtime-attributes-while-running-a-scheduled-batch/m-p/902352#M356594</link>
      <description>&lt;P&gt;Thank you very much. This is exacly the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2023 16:13:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Getting-LSF-runtime-attributes-while-running-a-scheduled-batch/m-p/902352#M356594</guid>
      <dc:creator>macrobo</dc:creator>
      <dc:date>2023-11-09T16:13:21Z</dc:date>
    </item>
  </channel>
</rss>

