<?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: call symputn produces ERROR: subroutine SYMPUTN is unknown in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/call-symputn-produces-ERROR-subroutine-SYMPUTN-is-unknown/m-p/912027#M359588</link>
    <description>&lt;P&gt;That worked, thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jan 2024 21:25:36 GMT</pubDate>
    <dc:creator>Doug_in_STL</dc:creator>
    <dc:date>2024-01-18T21:25:36Z</dc:date>
    <item>
      <title>call symputn produces ERROR: subroutine SYMPUTN is unknown</title>
      <link>https://communities.sas.com/t5/SAS-Programming/call-symputn-produces-ERROR-subroutine-SYMPUTN-is-unknown/m-p/912024#M359585</link>
      <description>&lt;P&gt;My task is to compare the create dates between two SAS datasets and abort processing if one is older than the other. To accomplish this, I'm using PROC DATASETS and outputting to two new datasets, keeping only the "crdate" (creation date) field. Then I want to put the crdate value from each of those two datasets into macro variables so I can query them in a subsequent DATA step.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;/*sort one dataset to force a new create date*/&lt;/P&gt;&lt;P&gt;proc sort data=reclassfinal;&amp;nbsp;&lt;BR /&gt;by EntityID;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;proc datasets library=work nolist nodetails noprint;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; contents data=componentfinal out=work.ComponentDate(keep=crdate);run; /*1st dataset, keeping only crdate*/&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; contents data=reclassfinal out=work.ReclassDate(keep=crdate);run; /*2nd dataset (just sorted above), keeping only crdate*/&lt;/DIV&gt;&lt;DIV&gt;quit;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc datasets library=work nolist nodetails noprint; /*strip out the default datetime formatting of crdate, just in case*/&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; modify ComponentDate;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; attrib _all_ format=;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;attrib _all_ informat=;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; modify ReclassDate;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; attrib _all_ format=;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;attrib _all_ informat=;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;quit;&lt;/DIV&gt;&lt;DIV&gt;********** everything above this line works just fine *********************;&lt;/DIV&gt;&lt;DIV&gt;data _null_;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; set ReclassDate(in=a) ComponentDate(in=b);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; if a then call &lt;STRONG&gt;symputn&lt;/STRONG&gt;('ReclDate',crDate); /*create numeric macro variable because crdate is a number*/&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; if b then call &lt;STRONG&gt;symputn&lt;/STRONG&gt;('CompDate',crDate);&amp;nbsp; /*create numeric macro variable because crdate is a number*/&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;********* this is where things fail *********************;&lt;/DIV&gt;&lt;DIV&gt;LOG:&lt;/DIV&gt;&lt;DIV&gt;11131 data _null_;&lt;BR /&gt;11132 set ReclassDate(in=a) ComponentDate(in=b);&lt;BR /&gt;11133 if a then call symputn('RDate',crDate);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-------&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;251&lt;BR /&gt;11134 if b then call symputn('CDate',crDate);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-------&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 251&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ERROR 251-185: The subroutine SYMPUTN is unknown, or cannot be accessed. Check your spelling.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Either it was not found in the path(s) of executable images, or there was incorrect or&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;missing subroutine descriptor information.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;******************** remaining code below ********************;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;data _null_;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; if &amp;amp;ReclDate &amp;gt; &amp;amp;CompDate then do;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; file print;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;put 'Component mapping not completed. OH Alloc process halted.';&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;abort cancel;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;end;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;&lt;DIV&gt;*************************************************** end of code *****************************;&lt;/DIV&gt;&lt;DIV&gt;If I replace symput&lt;STRONG&gt;n&lt;/STRONG&gt; with just &lt;STRONG&gt;symput&lt;/STRONG&gt;, it all works perfectly, with the exception of this note:&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#00CCFF"&gt;NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;because crdate is numeric and "symput" is meant for character macro variables.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So yes, I can roll along with "symput", but I'd like to know why "symputn" is not working.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Follow-up question:&lt;/DIV&gt;&lt;DIV&gt;Is there a more straightforward method to compare create dates among &amp;gt;1 dataset?&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Win11Pro X64 environment, v9.4 TS 1M8&lt;/DIV&gt;&lt;DIV&gt;Thanks, as always.&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 Jan 2024 21:10:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/call-symputn-produces-ERROR-subroutine-SYMPUTN-is-unknown/m-p/912024#M359585</guid>
      <dc:creator>Doug_in_STL</dc:creator>
      <dc:date>2024-01-18T21:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: call symputn produces ERROR: subroutine SYMPUTN is unknown</title>
      <link>https://communities.sas.com/t5/SAS-Programming/call-symputn-produces-ERROR-subroutine-SYMPUTN-is-unknown/m-p/912025#M359586</link>
      <description>&lt;P&gt;Try SYMPUTX.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 21:21:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/call-symputn-produces-ERROR-subroutine-SYMPUTN-is-unknown/m-p/912025#M359586</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-01-18T21:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: call symputn produces ERROR: subroutine SYMPUTN is unknown</title>
      <link>https://communities.sas.com/t5/SAS-Programming/call-symputn-produces-ERROR-subroutine-SYMPUTN-is-unknown/m-p/912027#M359588</link>
      <description>&lt;P&gt;That worked, thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 21:25:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/call-symputn-produces-ERROR-subroutine-SYMPUTN-is-unknown/m-p/912027#M359588</guid>
      <dc:creator>Doug_in_STL</dc:creator>
      <dc:date>2024-01-18T21:25:36Z</dc:date>
    </item>
  </channel>
</rss>

