<?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: Run SAS Job on Unix for multiple files in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Run-SAS-Job-on-Unix-for-multiple-files/m-p/374493#M89683</link>
    <description>&lt;P&gt;$1, $2 and so on are UNIX environment variables that a UNIX shell parses from the commandline with which a shell script was invoked.&lt;/P&gt;
&lt;P&gt;To get the value of a UNIX environment variable, use the sysget() data step or %sysget() macro function.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jul 2017 13:34:35 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-07-10T13:34:35Z</dc:date>
    <item>
      <title>Run SAS Job on Unix for multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-SAS-Job-on-Unix-for-multiple-files/m-p/374488#M89679</link>
      <description>&lt;P&gt;/*SAS Job name test.sas*/&lt;/P&gt;&lt;P&gt;libname srcf "$1";&lt;/P&gt;&lt;P&gt;data srcf.$2;&lt;/P&gt;&lt;P&gt;input a;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;I want to run as below :&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*value of $1 =&amp;nbsp;&lt;SPAN&gt;/mdir/subdir/*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/*value of $2 = test_par*/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Unix command as below :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sasgsub -gridwait -gridsubmitpgm test.sas &lt;SPAN&gt;/mdir/subdir/&lt;/SPAN&gt;1 test_par&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 13:29:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-SAS-Job-on-Unix-for-multiple-files/m-p/374488#M89679</guid>
      <dc:creator>atul_desh</dc:creator>
      <dc:date>2017-07-10T13:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Run SAS Job on Unix for multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-SAS-Job-on-Unix-for-multiple-files/m-p/374493#M89683</link>
      <description>&lt;P&gt;$1, $2 and so on are UNIX environment variables that a UNIX shell parses from the commandline with which a shell script was invoked.&lt;/P&gt;
&lt;P&gt;To get the value of a UNIX environment variable, use the sysget() data step or %sysget() macro function.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2017 13:34:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-SAS-Job-on-Unix-for-multiple-files/m-p/374493#M89683</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-10T13:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Run SAS Job on Unix for multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-SAS-Job-on-Unix-for-multiple-files/m-p/374958#M89830</link>
      <description>&lt;P&gt;command :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sasgsub -gridwait -gridsubmitpgm /path1/test.sas -gridsasopts "(-sysparm 'dest_path/fol1&amp;nbsp;testds')"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;test.sas :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let path=%scan(sysparm(),1,' ');&lt;BR /&gt;%let ds=%scan(sysparm(),2,' ');&lt;BR /&gt;libname pt "&amp;amp;path";&lt;BR /&gt;data pt.&amp;amp;ds;&lt;BR /&gt;input a;&lt;BR /&gt;datalines;&lt;BR /&gt;1&lt;BR /&gt;2&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;path &amp;amp; ds are not resolving !!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 13:48:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-SAS-Job-on-Unix-for-multiple-files/m-p/374958#M89830</guid>
      <dc:creator>atul_desh</dc:creator>
      <dc:date>2017-07-11T13:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Run SAS Job on Unix for multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-SAS-Job-on-Unix-for-multiple-files/m-p/374963#M89832</link>
      <description>&lt;P&gt;When you do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let path=%scan(sysparm(),1,' ');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;%scan scans the TEXT(!) sysparm() for the first word, and delivers&lt;/P&gt;
&lt;PRE&gt;sysparm()&lt;/PRE&gt;
&lt;P&gt;so &amp;amp;path will always just render sysparm(). Also keep in mind that the macro preprocessor only knows the data type text, and therefore quotes around strings are not needed and cause harm.&lt;/P&gt;
&lt;P&gt;Try this instead:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
length path $100;
path = scan(sysparm(),1,' ');
call symput('path',trim(path));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Jul 2017 13:56:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-SAS-Job-on-Unix-for-multiple-files/m-p/374963#M89832</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-11T13:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Run SAS Job on Unix for multiple files</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Run-SAS-Job-on-Unix-for-multiple-files/m-p/374964#M89833</link>
      <description>&lt;P&gt;It worked :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let path=%scan(&amp;amp;sysparm,1,' ');&lt;BR /&gt;%let ds=%scan(&amp;amp;sysparm,2,' ');&lt;BR /&gt;libname pt "&amp;amp;path";&lt;BR /&gt;data pt.&amp;amp;ds;&lt;BR /&gt;input a;&lt;BR /&gt;datalines;&lt;BR /&gt;1&lt;BR /&gt;2&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 13:56:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Run-SAS-Job-on-Unix-for-multiple-files/m-p/374964#M89833</guid>
      <dc:creator>atul_desh</dc:creator>
      <dc:date>2017-07-11T13:56:40Z</dc:date>
    </item>
  </channel>
</rss>

