<?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: symput  doesn't show any thing in SAS log. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741356#M231744</link>
    <description>&lt;P&gt;What do we need to do to write all the values of a variable in a dataset?&lt;/P&gt;
&lt;P&gt;Are you referring that call symput returns only one value because the previous value is overwritten by a new call of macro?&lt;/P&gt;
&lt;P&gt;Let me test a code and I will get back to you.&lt;/P&gt;
&lt;P&gt;I am totally confused. I run the code and it doesn't show anything on the log. It has to show some value on the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Right now this code shows only code itself on the log and I can't understand why:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;&lt;BR /&gt;input name $ value $;&lt;BR /&gt;datalines;&lt;BR /&gt;a 1&lt;BR /&gt;b x&lt;BR /&gt;c f3&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;set have;&lt;BR /&gt;call symputx(name,value);&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Blue Blue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 14 May 2021 05:54:58 GMT</pubDate>
    <dc:creator>GN0001</dc:creator>
    <dc:date>2021-05-14T05:54:58Z</dc:date>
    <item>
      <title>symput  doesn't show any thing in SAS log.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741018#M231595</link>
      <description>&lt;P&gt;Hello team,&lt;/P&gt;
&lt;P&gt;I have this code, it is not showing anything in the log:&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Blue Blue&lt;/P&gt;
&lt;PRE&gt;Data _NULL_;
Set SAShelp._CMPIDX_;
Call symput('ABC',key);
Run;

%put &amp;amp;ABC;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 May 2021 05:20:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741018#M231595</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-05-13T05:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: symput  doesn't show any thing in SAS log.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741019#M231596</link>
      <description>&lt;P&gt;Please show the complete log from that code.&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 05:25:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741019#M231596</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-05-13T05:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: symput  doesn't show any thing in SAS log.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741050#M231617</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I cut/pasted your code into a SAS session, and there is output in the log:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;85  Data _NULL_;
586  Set SAShelp._CMPIDX_;
587  Call symput('ABC',key);
588  Run;

NOTE: There were 44 observations read from the data set SASHELP._CMPIDX_.
NOTE: DATA statement used (Total process time):
      real time           0.06 seconds
      cpu time            0.03 seconds


589
590  %put &amp;amp;ABC;
stat

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I suspect that you have unbalanced quotes somewhere in your SAS session. Close SAS, then reopen cut/paste the code you provided, and submit that. Then cut/paste the log to this thread.&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 10:26:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741050#M231617</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2021-05-13T10:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: symput  doesn't show any thing in SAS log.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741051#M231618</link>
      <description>&lt;P&gt;Using the log from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/226241"&gt;@AMSAS&lt;/a&gt;&amp;nbsp;, it looks like &lt;FONT face="courier new,courier"&gt;%put &amp;amp;ABC;&lt;/FONT&gt; produces the output &lt;FONT face="courier new,courier"&gt;stat&lt;/FONT&gt;, which would be correct. So,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp;, we really need to see your &lt;FONT color="#FF0000"&gt;complete&lt;/FONT&gt; log (including the actual code and any output, any WARNINGs ERRORs and NOTEs). For your future benefit, when there are problems in the log, then SHOW US the log.&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 10:37:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741051#M231618</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-05-13T10:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: symput  doesn't show any thing in SAS log.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741076#M231634</link>
      <description>&lt;P&gt;&lt;STRONG&gt;I have rerun the code and the code perform well as written.&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;The last value of key is "stat" and that is reproduced in the log.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Perhaps&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp; had something other in mind.&lt;/P&gt;
&lt;P&gt;The results of my run are as follows.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data _NULL_;
Set SAShelp._CMPIDX_;
Call symput('ABC',key);
Run;

%put &amp;amp;=ABC;
The complete log is as follows
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         Data _NULL_;
 74         Set SAShelp._CMPIDX_;
 75         Call symput('ABC',key);
 76         Run;
 
 NOTE: There were 44 observations read from the data set SASHELP._CMPIDX_.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              622.65k
       OS Memory           31396.00k
       Timestamp           05/13/2021 12:18:39 PM
       Step Count                        96  Switch Count  0
       Page Faults                       0
       Page Reclaims                     92
       Page Swaps                        0
       Voluntary Context Switches        0
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           0
       
 
 77         
 78         %put &amp;amp;=ABC;
&lt;SPAN&gt;ABC=stat&lt;/SPAN&gt;
 79         
 80         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 92         &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 May 2021 12:22:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741076#M231634</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2021-05-13T12:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: symput  doesn't show any thing in SAS log.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741342#M231730</link>
      <description>Hello,&lt;BR /&gt;It is only showing the last observation?&lt;BR /&gt;Why?&lt;BR /&gt;Respectfully,&lt;BR /&gt;Blue Blue</description>
      <pubDate>Fri, 14 May 2021 04:23:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741342#M231730</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-05-14T04:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: symput  doesn't show any thing in SAS log.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741350#M231738</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hello,&lt;BR /&gt;It is only showing the last observation?&lt;BR /&gt;Why?&lt;BR /&gt;Respectfully,&lt;BR /&gt;Blue Blue&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Because the CALL SYMPUT(X) routine will "overwrite" the macro variable every time it is called.&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 05:15:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741350#M231738</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-05-14T05:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: symput  doesn't show any thing in SAS log.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741356#M231744</link>
      <description>&lt;P&gt;What do we need to do to write all the values of a variable in a dataset?&lt;/P&gt;
&lt;P&gt;Are you referring that call symput returns only one value because the previous value is overwritten by a new call of macro?&lt;/P&gt;
&lt;P&gt;Let me test a code and I will get back to you.&lt;/P&gt;
&lt;P&gt;I am totally confused. I run the code and it doesn't show anything on the log. It has to show some value on the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Right now this code shows only code itself on the log and I can't understand why:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have;&lt;BR /&gt;input name $ value $;&lt;BR /&gt;datalines;&lt;BR /&gt;a 1&lt;BR /&gt;b x&lt;BR /&gt;c f3&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;set have;&lt;BR /&gt;call symputx(name,value);&lt;BR /&gt;run;&lt;/PRE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Blue Blue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 05:54:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741356#M231744</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-05-14T05:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: symput  doesn't show any thing in SAS log.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741415#M231766</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ran the code you provided and it returns the following in the log, which is what I would expect in the SAS log.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1999  data have;
2000      input name $ value $;
2001  datalines;

NOTE: The data set WORK.HAVE has 3 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.01 seconds


2005  ;
2006
2007  data _null_;
2008      set have;
2009      call symputx(name,value);
2010  run;

NOTE: There were 3 observations read from the data set WORK.HAVE.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Having said that, your first sentence "&lt;SPAN&gt;What do we need to do to write all the values of a variable in a dataset?&lt;/SPAN&gt;" appears to indicate that you expect the second data step to create a SAS Data set that contains all the variables in the "have" dataset.&lt;BR /&gt;&lt;BR /&gt;If this is correct then you don't need the call symputx and need to replace _null_ with your output data set name, which will result in this SAS log:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;2011  data have;
2012      input name $ value $;
2013  datalines;

NOTE: The data set WORK.HAVE has 3 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.02 seconds
      cpu time            0.01 seconds


2017  ;
2018
2019  data want ;
2020      set have;
2021  run;

NOTE: There were 3 observations read from the data set WORK.HAVE.
NOTE: The data set WORK.WANT has 3 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.04 seconds
      cpu time            0.04 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want to just put the values of variables name and value to the log then add a PUT statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;2022  data have;
2023      input name $ value $;
2024  datalines;

NOTE: The data set WORK.HAVE has 3 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.02 seconds
      cpu time            0.01 seconds


2028  ;
2029
2030  data want ;
2031      set have;
2032      put name= value= ;
2033  run;

name=a value=1
name=b value=x
name=c value=f3
NOTE: There were 3 observations read from the data set WORK.HAVE.
NOTE: The data set WORK.WANT has 3 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.02 seconds
      cpu time            0.01 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It's not clear to me what you want to achieve, or what you expect as output. If you could provide a more detailed explanation of what you have and what you expect to get as a result then I'm sure someone will be able to help you further.&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 12:52:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741415#M231766</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2021-05-14T12:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: symput  doesn't show any thing in SAS log.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741433#M231770</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hello,&lt;BR /&gt;It is only showing the last observation?&lt;BR /&gt;Why?&lt;BR /&gt;Respectfully,&lt;BR /&gt;Blue Blue&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Each observation of the data set replaces the value of the macro variable. So when you get to the end of the data set, the macro variable contains the last value in the data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As stated by others: what are you trying to accomplish, what is the goal here?&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 13:08:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741433#M231770</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-05-14T13:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: symput  doesn't show any thing in SAS log.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741776#M231933</link>
      <description>&lt;P&gt;what you explained suffice what I am looking for.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Blue Blue&lt;/P&gt;</description>
      <pubDate>Sun, 16 May 2021 20:10:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741776#M231933</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2021-05-16T20:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: symput  doesn't show any thing in SAS log.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741778#M231935</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/202329"&gt;@GN0001&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;what you explained suffice what I am looking for.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Blue Blue&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Great, but what is the goal? What are you trying to do with a macro variable here? Why did you put a CALL SYMPUT at the end of that data step?&lt;/P&gt;</description>
      <pubDate>Sun, 16 May 2021 21:16:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/symput-doesn-t-show-any-thing-in-SAS-log/m-p/741778#M231935</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-05-16T21:16:20Z</dc:date>
    </item>
  </channel>
</rss>

