<?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: Create a macro for jobs in SMC in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Create-a-macro-for-jobs-in-SMC/m-p/779792#M23396</link>
    <description>Could you add a %let statement to the autoexec_usermods.sas in SASApp/BatchServer? Then the macro variable would be set for every SAS session started there, which should be every job.</description>
    <pubDate>Thu, 11 Nov 2021 13:37:01 GMT</pubDate>
    <dc:creator>gwootton</dc:creator>
    <dc:date>2021-11-11T13:37:01Z</dc:date>
    <item>
      <title>Create a macro for jobs in SMC</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Create-a-macro-for-jobs-in-SMC/m-p/779743#M23394</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is there a way to feed a macro variable into every job in a flow from management console/flow manager? Without having to change every individual job or is there a way to&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;define an environment variable set in management console as a macro variable in SAS? It isn't recognising the macro variables set at the moment&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SS&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 09:34:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Create-a-macro-for-jobs-in-SMC/m-p/779743#M23394</guid>
      <dc:creator>sathya66</dc:creator>
      <dc:date>2021-11-11T09:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create a macro for jobs in SMC</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Create-a-macro-for-jobs-in-SMC/m-p/779792#M23396</link>
      <description>Could you add a %let statement to the autoexec_usermods.sas in SASApp/BatchServer? Then the macro variable would be set for every SAS session started there, which should be every job.</description>
      <pubDate>Thu, 11 Nov 2021 13:37:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Create-a-macro-for-jobs-in-SMC/m-p/779792#M23396</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2021-11-11T13:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create a macro for jobs in SMC</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Create-a-macro-for-jobs-in-SMC/m-p/779855#M23398</link>
      <description>&lt;P&gt;If you are using the LSF scheduler in SMC then you can add an environment variable to the job then use the SYSGET SAS function to read that into a macro variable. We use this technique ourselves and it is a great way to supply job inputs automatically.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let batch_var = %sysfunc(sysget(batch_var)); * Reads an environment variable called batch_var.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Nov 2021 20:18:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Create-a-macro-for-jobs-in-SMC/m-p/779855#M23398</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-11-11T20:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create a macro for jobs in SMC</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Create-a-macro-for-jobs-in-SMC/m-p/780384#M23409</link>
      <description>yes but this one only for perticuler user so we don't want to put it in autoexc.</description>
      <pubDate>Tue, 16 Nov 2021 10:50:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Create-a-macro-for-jobs-in-SMC/m-p/780384#M23409</guid>
      <dc:creator>sathya66</dc:creator>
      <dc:date>2021-11-16T10:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create a macro for jobs in SMC</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Create-a-macro-for-jobs-in-SMC/m-p/780390#M23410</link>
      <description>&lt;P&gt;When the SAS session starts, it's already running with the correct user-id, so you can query that in the autoexec.sas by using&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%if %sysget(USER) = ....
%then %do;
  %let macrovar = ....;
%end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Nov 2021 11:30:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Create-a-macro-for-jobs-in-SMC/m-p/780390#M23410</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-11-16T11:30:26Z</dc:date>
    </item>
  </channel>
</rss>

