<?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: Exporting unix parameter to sas datastep in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Exporting-unix-parameter-to-sas-datastep/m-p/436800#M282199</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/134796"&gt;@Deepti44&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can i know how to export unix variable to sas datastep.Im executing below code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;X "cat /cis01/whlbio/WHL_BIO_PRODUCTION/WHL_BIO_PAIDOUT_OBLN_404_OPSRISK/logs/Paidout_obln_production_script.log |grep ^ERROR:* &amp;gt; /cis01/whlbio/WHL_BIO_PRODUCTION/WHL_BIO_PAIDOUT_OBLN_404_OPSRISK/logs/xx.dat";&lt;BR /&gt;X "count=cat /cis01/whlbio/WHL_BIO_PRODUCTION/WHL_BIO_PAIDOUT_OBLN_404_OPSRISK/logs/xx.dat|wc -l";&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to export count parameter to sas macro variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i used&amp;nbsp;below file name pipe, &lt;FONT color="#ff0000"&gt;but&amp;nbsp; can able to see the result in the sas eg frontend but not in batch execution&lt;/FONT&gt;. any idea why ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename temp pipe "cat /cis01/whlbio/WHL_BIO_PRODUCTION/WHL_BIO_PAIDOUT_OBLN_404_OPSRISK/logs/xx.dat|wc -l";&lt;/P&gt;
&lt;P&gt;data temp1;&lt;BR /&gt;infile temp;&lt;BR /&gt;input count 2.; /** read the result of the wc command **/&lt;BR /&gt;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Your EG sessions and the batch environment may be running with different permissions and I can't tell if the path your are using is relative or absolute but from where the batch environment executes the path may not be accessible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What does the log of the batch job look like. Paste the relevant section with the filename and data step plus any notes, warnings and errors into a code box opened in the forum using the {I} icon at the top of the message window. The code box helps because there are often diagnostic characters in the error messages but the main message windows on this forum will reformat text moving them from the position of the error.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Feb 2018 18:14:04 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-02-13T18:14:04Z</dc:date>
    <item>
      <title>Exporting unix parameter to sas datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-unix-parameter-to-sas-datastep/m-p/436785#M282196</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can i know how to export unix variable to sas datastep.Im executing below code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;X "cat /cis01/whlbio/WHL_BIO_PRODUCTION/WHL_BIO_PAIDOUT_OBLN_404_OPSRISK/logs/Paidout_obln_production_script.log |grep ^ERROR:* &amp;gt; /cis01/whlbio/WHL_BIO_PRODUCTION/WHL_BIO_PAIDOUT_OBLN_404_OPSRISK/logs/xx.dat";&lt;BR /&gt;X "count=cat /cis01/whlbio/WHL_BIO_PRODUCTION/WHL_BIO_PAIDOUT_OBLN_404_OPSRISK/logs/xx.dat|wc -l";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to export count parameter to sas macro variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i used&amp;nbsp;below file name pipe, but&amp;nbsp; can able to see the result in the sas eg frontend but not in batch execution. any idea why ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename temp pipe "cat /cis01/whlbio/WHL_BIO_PRODUCTION/WHL_BIO_PAIDOUT_OBLN_404_OPSRISK/logs/xx.dat|wc -l";&lt;/P&gt;&lt;P&gt;data temp1;&lt;BR /&gt;infile temp;&lt;BR /&gt;input count 2.; /** read the result of the wc command **/&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 17:09:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-unix-parameter-to-sas-datastep/m-p/436785#M282196</guid>
      <dc:creator>Deepti44</dc:creator>
      <dc:date>2018-02-13T17:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting unix parameter to sas datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-unix-parameter-to-sas-datastep/m-p/436789#M282197</link>
      <description>&lt;P&gt;%SYSGET is the usual SAS tool for retrieving the value of a Unix environmental variable into a SAS macro variable.&amp;nbsp; Within a SAS program (for example):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let SAS_macro_varname = %SYSGET(Unix_env_varname);&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 17:24:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-unix-parameter-to-sas-datastep/m-p/436789#M282197</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-02-13T17:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting unix parameter to sas datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-unix-parameter-to-sas-datastep/m-p/436791#M282198</link>
      <description>&lt;P&gt;I tried this but im getting below warning:&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;X "cat /cis01/whlbio/WHL_BIO_PRODUCTION/WHL_BIO_PAIDOUT_OBLN_404_OPSRISK/logs/Paidout_obln_production_script.log |grep ^ERROR:* &amp;gt; /cis01/whlbio/WHL_BIO_PRODUCTION/WHL_BIO_PAIDOUT_OBLN_404_OPSRISK/logs/xx.dat";&lt;BR /&gt;X "count=cat /cis01/whlbio/WHL_BIO_PRODUCTION/WHL_BIO_PAIDOUT_OBLN_404_OPSRISK/logs/xx.dat|wc -l";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;%let count1=%sysget(count);&lt;BR /&gt;%put &amp;amp;count1.;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;WARNING: The argument to macro function %SYSGET is not defined as a system variable.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 17:29:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-unix-parameter-to-sas-datastep/m-p/436791#M282198</guid>
      <dc:creator>Deepti44</dc:creator>
      <dc:date>2018-02-13T17:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting unix parameter to sas datastep</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exporting-unix-parameter-to-sas-datastep/m-p/436800#M282199</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/134796"&gt;@Deepti44&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can i know how to export unix variable to sas datastep.Im executing below code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;X "cat /cis01/whlbio/WHL_BIO_PRODUCTION/WHL_BIO_PAIDOUT_OBLN_404_OPSRISK/logs/Paidout_obln_production_script.log |grep ^ERROR:* &amp;gt; /cis01/whlbio/WHL_BIO_PRODUCTION/WHL_BIO_PAIDOUT_OBLN_404_OPSRISK/logs/xx.dat";&lt;BR /&gt;X "count=cat /cis01/whlbio/WHL_BIO_PRODUCTION/WHL_BIO_PAIDOUT_OBLN_404_OPSRISK/logs/xx.dat|wc -l";&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to export count parameter to sas macro variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i used&amp;nbsp;below file name pipe, &lt;FONT color="#ff0000"&gt;but&amp;nbsp; can able to see the result in the sas eg frontend but not in batch execution&lt;/FONT&gt;. any idea why ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename temp pipe "cat /cis01/whlbio/WHL_BIO_PRODUCTION/WHL_BIO_PAIDOUT_OBLN_404_OPSRISK/logs/xx.dat|wc -l";&lt;/P&gt;
&lt;P&gt;data temp1;&lt;BR /&gt;infile temp;&lt;BR /&gt;input count 2.; /** read the result of the wc command **/&lt;BR /&gt;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Your EG sessions and the batch environment may be running with different permissions and I can't tell if the path your are using is relative or absolute but from where the batch environment executes the path may not be accessible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What does the log of the batch job look like. Paste the relevant section with the filename and data step plus any notes, warnings and errors into a code box opened in the forum using the {I} icon at the top of the message window. The code box helps because there are often diagnostic characters in the error messages but the main message windows on this forum will reformat text moving them from the position of the error.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 18:14:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exporting-unix-parameter-to-sas-datastep/m-p/436800#M282199</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-02-13T18:14:04Z</dc:date>
    </item>
  </channel>
</rss>

