<?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: macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/235127#M43045</link>
    <description>&lt;P&gt;OK, assuming you are comfortable with the topics that I listed, here is the general idea of the logic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Each iteration through the %DO loop picks off the name of the next macro variable in &amp;amp;VARLIST.&amp;nbsp; It gets stored in &amp;amp;NEXTNAME.&amp;nbsp; The %PUT statement then writes the name of the macro variable (&amp;amp;NEXTNAME) and its value (&amp;amp;&amp;amp;&amp;amp;NEXTNAME).&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2015 20:41:24 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2015-11-17T20:41:24Z</dc:date>
    <item>
      <title>macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234837#M42973</link>
      <description>&lt;P&gt;&lt;SPAN&gt;%let a=10 b=12 c=15;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;%macro test(varlist=a b c test1);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;want to display varlist to the log with the variables &amp;amp; their values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 08:16:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234837#M42973</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2015-11-16T08:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234838#M42974</link>
      <description>Try &lt;BR /&gt;&lt;BR /&gt;%let a=10;&lt;BR /&gt;%let b=12;&lt;BR /&gt;%let c=15;&lt;BR /&gt;&lt;BR /&gt;%put &amp;amp;a &amp;amp;b &amp;amp;c&lt;BR /&gt;&lt;BR /&gt;This will display the values of macro variables a b and c to the log&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Nov 2015 08:22:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234838#M42974</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2015-11-16T08:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234840#M42975</link>
      <description>no no &lt;BR /&gt;%let a=10 b=12 c=15;&lt;BR /&gt;%macro test (varlist= a b c)&lt;BR /&gt;i want to display varlist variables reference &amp;amp; a &amp;amp;b &amp;amp;c</description>
      <pubDate>Mon, 16 Nov 2015 08:49:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234840#M42975</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2015-11-16T08:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234841#M42976</link>
      <description>&lt;P&gt;This is a duplicate post:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/SAS-program-to-write-the-values-of-all-local-variables-to-the/m-p/234836#M34237" target="_blank"&gt;https://communities.sas.com/t5/General-SAS-Programming/SAS-program-to-write-the-values-of-all-local-variables-to-the/m-p/234836#M34237&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 08:52:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234841#M42976</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-11-16T08:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234853#M42979</link>
      <description>&lt;P&gt;Are you willing to accept a solution that works, even if you probably can't understand it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro test (varlist=);&lt;/P&gt;
&lt;P&gt;%local i nextword;&lt;/P&gt;
&lt;P&gt;%do i=1 %to %sysfunc(countw(&amp;amp;varlist));&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;%let nextword = %scan(&amp;amp;varlist, &amp;amp;i);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;%put &amp;amp;nextword = &amp;amp;&amp;amp;&amp;amp;nextword;&lt;/P&gt;
&lt;P&gt;%end;&lt;/P&gt;
&lt;P&gt;%mend test;&lt;/P&gt;
&lt;P&gt;%test (varlist=a b c)&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 12:18:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234853#M42979</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-11-16T12:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234958#M43002</link>
      <description>thanks &amp;amp;explain the logic.</description>
      <pubDate>Tue, 17 Nov 2015 06:36:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234958#M43002</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2015-11-17T06:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234987#M43012</link>
      <description>what i mean to ask from my question is in a random macro data session i want to display variables and their values in d log i need a generic code to do it. so i gave a example  &lt;BR /&gt;%let a=10 b=12 c=15;&lt;BR /&gt;%macro test(varlist= a b c ); &lt;BR /&gt;i want to display a b c from varlist with its defined values can i use scan or substrng function to read d chars &amp;amp; then display it in d log.&lt;BR /&gt;i cant find a logic to do so, thus am asking u for a solution or a code .&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Nov 2015 10:38:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234987#M43012</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2015-11-17T10:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234990#M43014</link>
      <description>&lt;P&gt;Sorry, I am not sure another way of putting this. &amp;nbsp;Your code:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%let a=10 b=12 c=15;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Creates a macro variable called A, with the character string "10 b=12 c=15". &amp;nbsp;it doesn't create three macro variables as you seem to think it does.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;To display macro variables you can use &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%put _local_; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%put _global_;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Or query the SASHELP.VMACRO dataset.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 11:29:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/234990#M43014</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-11-17T11:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/235012#M43021</link>
      <description>&lt;P&gt;Based on this original statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let a=10 b=12 c=15;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There would be too much to explain.&amp;nbsp; You would really need to read a book on macro language to come up to speed on the basics.&amp;nbsp; If you are willing to do the work, here is a list of topics you would need to research:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the purpose of a %local statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the purpose of %sysfunc?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What does the COUNTW function do?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What does the %SCAN function do?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do you resolve &amp;amp;&amp;amp;&amp;amp;nextword?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 14:01:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/235012#M43021</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-11-17T14:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/235098#M43033</link>
      <description>yes ur argument is correct its a single macro varlist=a b c so i want to read 1 char at a time using scan or substring &amp;amp; display it.or with data null also u can do it.</description>
      <pubDate>Tue, 17 Nov 2015 18:30:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/235098#M43033</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2015-11-17T18:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/235099#M43034</link>
      <description>thanks i know macro i am trying to ask u purpose of ur logic does it display &amp;amp; read every single variable  a b c with their respective value</description>
      <pubDate>Tue, 17 Nov 2015 18:32:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/235099#M43034</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2015-11-17T18:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/235100#M43035</link>
      <description>and y are u using indirect reference as u haven't defined any 1 variable with different values..</description>
      <pubDate>Tue, 17 Nov 2015 18:34:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/235100#M43035</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2015-11-17T18:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/235119#M43043</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/60507"&gt;@RTelang&lt;/a&gt; wrote:&lt;BR /&gt;yes ur argument is correct its a single macro varlist=a b c so i want to read 1 char at a time using scan or substring &amp;amp; display it.or with data null also u can do it.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Time to show what you are expecting to see in the log for your example input. Exactly, not a description.&lt;/P&gt;
&lt;P&gt;Something like this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;b&lt;/P&gt;
&lt;P&gt;=&lt;/P&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;P&gt;0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;b&lt;/P&gt;
&lt;P&gt;=&lt;/P&gt;
&lt;P&gt;12&lt;/P&gt;
&lt;P&gt;that is a very different solution.&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;a&lt;/P&gt;
&lt;P&gt;b&lt;/P&gt;
&lt;P&gt;c&lt;/P&gt;
&lt;P&gt;t&lt;/P&gt;
&lt;P&gt;e&lt;/P&gt;
&lt;P&gt;s&lt;/P&gt;
&lt;P&gt;t&lt;/P&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I really can't tell at all from your descriptions what you think you want.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 19:23:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/235119#M43043</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-11-17T19:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/235127#M43045</link>
      <description>&lt;P&gt;OK, assuming you are comfortable with the topics that I listed, here is the general idea of the logic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Each iteration through the %DO loop picks off the name of the next macro variable in &amp;amp;VARLIST.&amp;nbsp; It gets stored in &amp;amp;NEXTNAME.&amp;nbsp; The %PUT statement then writes the name of the macro variable (&amp;amp;NEXTNAME) and its value (&amp;amp;&amp;amp;&amp;amp;NEXTNAME).&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 20:41:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/235127#M43045</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-11-17T20:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: macro to display%let a=10 b=12 c=15; %macro test(varlist=a b c test1); this values to the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/235178#M43049</link>
      <description>a=10&lt;BR /&gt;b=12&lt;BR /&gt;c=15</description>
      <pubDate>Wed, 18 Nov 2015 06:02:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-display-let-a-10-b-12-c-15-macro-test-varlist-a-b-c/m-p/235178#M43049</guid>
      <dc:creator>RTelang</dc:creator>
      <dc:date>2015-11-18T06:02:57Z</dc:date>
    </item>
  </channel>
</rss>

