<?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: sysfunc crdte error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sysfunc-crdte-error/m-p/765387#M242437</link>
    <description>You're right... I was testing, and forgot to change &amp;amp;dsid back to &amp;amp;id..&lt;BR /&gt;&lt;BR /&gt;that did it! Thanks!</description>
    <pubDate>Wed, 01 Sep 2021 15:10:09 GMT</pubDate>
    <dc:creator>fgasdg</dc:creator>
    <dc:date>2021-09-01T15:10:09Z</dc:date>
    <item>
      <title>sysfunc crdte error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sysfunc-crdte-error/m-p/765381#M242431</link>
      <description>&lt;P&gt;Code is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;libname mydata '/sas/prod/datamarts/rel/data/trans/';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data trans.loss;&lt;/P&gt;&lt;P&gt;%let data_set = trans.loss;&lt;BR /&gt;%let id = %sysfunc(open(trans.loss));&lt;BR /&gt;%let create_date = %sysfunc(attrn(&amp;amp;dsid,crdte));&lt;BR /&gt;%let dt = %sysfunc(datepart(&amp;amp;create_date),yymmdd10.);&lt;BR /&gt;%let close_flag = %sysfunc(close(&amp;amp;id));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I get the following error;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;31 %let create_date = %sysfunc(attrn(&amp;amp;dsid,crdte),yyyymm.);&lt;BR /&gt;SYMBOLGEN: Macro variable DSID resolves to 0&lt;BR /&gt;WARNING: Argument 1 to function ATTRN referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range.&lt;BR /&gt;NOTE: Mathematical operations could not be performed during %SYSFUNC function execution. The result of the operations have been set&lt;BR /&gt;to a missing value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea why it can't interpret crdte as a date?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 14:52:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sysfunc-crdte-error/m-p/765381#M242431</guid>
      <dc:creator>fgasdg</dc:creator>
      <dc:date>2021-09-01T14:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: sysfunc crdte error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sysfunc-crdte-error/m-p/765385#M242435</link>
      <description>&lt;P&gt;Are you even defining &amp;amp;dsid? I see you that you define &amp;amp;id. Use that instead of &amp;amp;dsid in your attrn argument?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not familiar with all that you're doing here. Troubleshooting beyond what I see above is beyond my comprehension.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm also confused why you're defining macro variables in a DATA step. Maybe also beyond my knowledge.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 15:06:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sysfunc-crdte-error/m-p/765385#M242435</guid>
      <dc:creator>maguiremq</dc:creator>
      <dc:date>2021-09-01T15:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: sysfunc crdte error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sysfunc-crdte-error/m-p/765387#M242437</link>
      <description>You're right... I was testing, and forgot to change &amp;amp;dsid back to &amp;amp;id..&lt;BR /&gt;&lt;BR /&gt;that did it! Thanks!</description>
      <pubDate>Wed, 01 Sep 2021 15:10:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sysfunc-crdte-error/m-p/765387#M242437</guid>
      <dc:creator>fgasdg</dc:creator>
      <dc:date>2021-09-01T15:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: sysfunc crdte error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sysfunc-crdte-error/m-p/765388#M242438</link>
      <description>&lt;P&gt;try changing follows.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let id = %sysfunc(open(trans.loss));&lt;BR /&gt;
%let close_flag = %sysfunc(close(&amp;amp;id));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;↓&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let dsid = %sysfunc(open(trans.loss));&lt;BR /&gt;
%let close_flag = %sysfunc(close(&amp;amp;dsid));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Sep 2021 15:10:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sysfunc-crdte-error/m-p/765388#M242438</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-09-01T15:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: sysfunc crdte error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sysfunc-crdte-error/m-p/765390#M242440</link>
      <description>&lt;P&gt;What value do you get from&lt;/P&gt;
&lt;P&gt;%let id = %sysfunc(open(trans.loss));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The place you are using &amp;amp;DSID expects an identifier from opening a file. You do not show any such code setting DSID. Did you mean to use &amp;amp;id?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The message&lt;/P&gt;
&lt;PRE&gt;31 %let create_date = %sysfunc(attrn(&amp;amp;dsid,crdte),yyyymm.);
SYMBOLGEN: Macro variable DSID resolves to 0&lt;/PRE&gt;
&lt;P&gt;tells you there is no identifier for a set assigned with DSID, so not set is open to read the attrn or any other function from that set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you start the code with:&lt;/P&gt;
&lt;P&gt;data trans.loss;&lt;/P&gt;
&lt;P&gt;you have placed the data set into write mode. So may be locked when the macro code executes. If you are going to manipulate things in macro code then do not mix with a data step. That way leads to madness quite often.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should describe what you are attempting to do as I strongly suspect macro code is not needed.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 15:16:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sysfunc-crdte-error/m-p/765390#M242440</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-09-01T15:16:42Z</dc:date>
    </item>
  </channel>
</rss>

