<?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: Obtaining Process Manager variables via SAS Code in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Obtaining-Process-Manager-variables-via-SAS-Code/m-p/564157#M10992</link>
    <description>&lt;P&gt;I've sorted this and here's the info for anyone who needs it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Process Manager you can set Global Variables via View &amp;gt; Global Variables. Add the variable name and its value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In SAS Management Console, you'll want to right click the relevant job and go to its Properties, then, under the General tab, click 'Modify' where the Environmental Variables option exists. Add the Variable name here (so if you chose to add &lt;EM&gt;AllowOverride&lt;/EM&gt; as the Variable Name and &lt;EM&gt;No&lt;/EM&gt; as the Variable Value within Process Manager, you'll enter &lt;EM&gt;AllowOverride&lt;/EM&gt; as the Variable Name here). Then just tick the box that states "Use the value of the user variable of the same name". The second box will be populated for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, to obtain the variable in the SAS code, you'll just use:&lt;/P&gt;&lt;P&gt;%let AllowOverride = %sysget(AllowOverride);&lt;BR /&gt;%put &amp;amp;=AllowOverride.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At no point did I put any additional commands in the command to execute (i.e. -set Var1=) as it's all done for you in the background.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also set this using Trigger Flow &amp;gt; With Variables and writing the line &lt;EM&gt;Var1=Whatever&lt;/EM&gt;.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jun 2019 15:13:44 GMT</pubDate>
    <dc:creator>_Dan_</dc:creator>
    <dc:date>2019-06-06T15:13:44Z</dc:date>
    <item>
      <title>Obtaining Process Manager variables via SAS Code</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Obtaining-Process-Manager-variables-via-SAS-Code/m-p/564118#M10985</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We're deploying a process whereby a check takes place and aborts the job if an exception occurs. There's going to be a macro variable in the code, let's call it AdminOverride, which is implicitly set to N. We'd like to set it to Y using the Trigger Flow &amp;gt; With Variables feature of Process Manager.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I've done similar things before by using the -set command line feature, and then %sysget(Var) in the SAS code being run. It appears this isn't working based on the test I've done so far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have set a flow with three jobs. Each job tries to %sysget Var1, Var2 &amp;amp; Var3. I have tried four different methods of creating Var1, 2 &amp;amp; 3:&lt;/P&gt;&lt;P&gt;View &amp;gt; Global Variables &amp;gt; Add. I now have a Var1, 2 &amp;amp; 3 each with their own value. This didn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On an exited flow, Right click &amp;gt; Set Variables &amp;gt; Add. I added JS_FLOW_VARIABLE_LIST as the Name and "Var1=Testing1" as the Value. This didn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the same exited Flow, Right click &amp;gt; Set Variables &amp;gt; Add. This time I just added Var1 as the Name and Testing_1 as the Value. This didn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally, on the exited flow, I clicked ReRun and then ticked the "With variables" box. I added the string "Var1=Testing__1" (without quotes). This also didn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, if neither of these options presents the variable so that I can obtain it via %sysget, what am I supposed to use to obtain the value of Var1, 2 &amp;amp; 3?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 14:30:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Obtaining-Process-Manager-variables-via-SAS-Code/m-p/564118#M10985</guid>
      <dc:creator>_Dan_</dc:creator>
      <dc:date>2019-06-06T14:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining Process Manager variables via SAS Code</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Obtaining-Process-Manager-variables-via-SAS-Code/m-p/564157#M10992</link>
      <description>&lt;P&gt;I've sorted this and here's the info for anyone who needs it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Process Manager you can set Global Variables via View &amp;gt; Global Variables. Add the variable name and its value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In SAS Management Console, you'll want to right click the relevant job and go to its Properties, then, under the General tab, click 'Modify' where the Environmental Variables option exists. Add the Variable name here (so if you chose to add &lt;EM&gt;AllowOverride&lt;/EM&gt; as the Variable Name and &lt;EM&gt;No&lt;/EM&gt; as the Variable Value within Process Manager, you'll enter &lt;EM&gt;AllowOverride&lt;/EM&gt; as the Variable Name here). Then just tick the box that states "Use the value of the user variable of the same name". The second box will be populated for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, to obtain the variable in the SAS code, you'll just use:&lt;/P&gt;&lt;P&gt;%let AllowOverride = %sysget(AllowOverride);&lt;BR /&gt;%put &amp;amp;=AllowOverride.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At no point did I put any additional commands in the command to execute (i.e. -set Var1=) as it's all done for you in the background.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also set this using Trigger Flow &amp;gt; With Variables and writing the line &lt;EM&gt;Var1=Whatever&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 15:13:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Obtaining-Process-Manager-variables-via-SAS-Code/m-p/564157#M10992</guid>
      <dc:creator>_Dan_</dc:creator>
      <dc:date>2019-06-06T15:13:44Z</dc:date>
    </item>
  </channel>
</rss>

