<?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: EnterpriseGuide(Windows) and AIX environment execute macro I/O functions differently. WARNING: Argument 1 to function ATTRN referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/EnterpriseGuide-Windows-and-AIX-environment-execute-macro-I-O/m-p/77345#M16697</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need %NRSTR to delay the macro call until after the data step finishes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; call execute(cats('%nrstr(%subchar_kurz_ausgabe(',vp_kuerzel,',',abdat,',',abda,'))'));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Sep 2013 13:36:19 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2013-09-10T13:36:19Z</dc:date>
    <item>
      <title>EnterpriseGuide(Windows) and AIX environment execute macro I/O functions differently. WARNING: Argument 1 to function ATTRN referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/EnterpriseGuide-Windows-and-AIX-environment-execute-macro-I-O/m-p/77344#M16696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello fellow programmers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the problem that SAS I/O functions executed in macros work flawlessly in EnterpriseGuide (Windows Client) but if run on an the SAS AIX server they generate the following Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WARNING: Argument 1 to function ATTRN referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range.&lt;/P&gt;&lt;P&gt;NOTE: Mathematical operations could not be performed during %SYSFUNC function execution. The result of the operations have been set to a missing value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here the rough code as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;BR /&gt;&lt;STRONG&gt;%macro subchar_kurz_ausgabe(vert,dat,da);&lt;/STRONG&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P style="padding-left: 90px;"&gt; proc sql;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; create table ausg_paxzahlen_&amp;amp;vert._&amp;amp;dat.(drop=andatx vertragspartner code code_depa code_dest hr_kenz) as&lt;BR /&gt;&amp;nbsp;&amp;nbsp; select &lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [...]&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&amp;nbsp;&amp;nbsp; from ausg_paxzahlen_&amp;amp;vert._&amp;amp;dat._verd &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [...] &lt;/P&gt;&lt;P style="padding-left: 90px;"&gt; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;STRONG&gt; %let datset = ausg_paxzahlen_&amp;amp;vert._&amp;amp;dat;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;STRONG&gt; %let dsid = %sysfunc(open(&amp;amp;datset));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; %let anzobs = %sysfunc(attrn(&amp;amp;dsid,nobs));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; %let dsid = %sysfunc(close(&amp;amp;dsid));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; %put &amp;amp;anzobs;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;BR /&gt;%if &amp;amp;anzobs gt 0 %then %do; &lt;/P&gt;&lt;P style="padding-left: 120px;"&gt;ods csvall file="/nfs/nfsserver/islisten/OPS/paxneu/&amp;amp;dateidat._&amp;amp;vert._&amp;amp;da._m.csv" options(delimiter=';');&lt;/P&gt;&lt;P style="padding-left: 120px;"&gt;proc print data=ausg_paxzahlen_&amp;amp;vert._&amp;amp;dat label noobs; run;&lt;/P&gt;&lt;P style="padding-left: 120px;"&gt;ods csvall close;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;STRONG&gt;%mend subchar_kurz_ausgabe;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;data _null_;&lt;BR /&gt;&amp;nbsp; set subsent;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; format abda $10.;&lt;BR /&gt;&amp;nbsp; do abdat = &amp;amp;dat_von to &amp;amp;dat_bis;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; abda = put(abdat,yymmddp10.);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; call execute(cats('%subchar_kurz_ausgabe(',vp_kuerzel,',',abdat,',',abda,')'));&lt;BR /&gt;&amp;nbsp; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;The aim of this construct ist to only generate csv files if there is any data available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As describes initially, this code works wonderfully in the EG (5.1, SAS Version 9.3) . On AIX DSID resolves to 0 and ANZOBS zo missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for some enlightement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yours,&lt;/P&gt;&lt;P&gt;Manuel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 13:32:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/EnterpriseGuide-Windows-and-AIX-environment-execute-macro-I-O/m-p/77344#M16696</guid>
      <dc:creator>m_pope</dc:creator>
      <dc:date>2013-09-10T13:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: EnterpriseGuide(Windows) and AIX environment execute macro I/O functions differently. WARNING: Argument 1 to function ATTRN referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/EnterpriseGuide-Windows-and-AIX-environment-execute-macro-I-O/m-p/77345#M16697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need %NRSTR to delay the macro call until after the data step finishes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; call execute(cats('%nrstr(%subchar_kurz_ausgabe(',vp_kuerzel,',',abdat,',',abda,'))'));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 13:36:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/EnterpriseGuide-Windows-and-AIX-environment-execute-macro-I-O/m-p/77345#M16697</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-09-10T13:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: EnterpriseGuide(Windows) and AIX environment execute macro I/O functions differently. WARNING: Argument 1 to function ATTRN referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/EnterpriseGuide-Windows-and-AIX-environment-execute-macro-I-O/m-p/77346#M16698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works perfectly, thanks very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 14:00:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/EnterpriseGuide-Windows-and-AIX-environment-execute-macro-I-O/m-p/77346#M16698</guid>
      <dc:creator>m_pope</dc:creator>
      <dc:date>2013-09-10T14:00:22Z</dc:date>
    </item>
  </channel>
</rss>

