<?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 how to generate a macro variable for each row using Call symputx in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-a-macro-variable-for-each-row-using-Call-symputx/m-p/876470#M42984</link>
    <description>&lt;P&gt;How to generate a new macro variable for each row?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data ConsentInfo&amp;amp;j.;
length record $4000;
set info_1;
i=_n_;
record=cats("'", '{ "firstName" : ',' "',firstName,'", ',' "lastName" : ','"',lastName,'", ','"email" :',
'"',email,'"}',"'");
call symputx('NewRecord',record,'g');	
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 18 May 2023 14:39:52 GMT</pubDate>
    <dc:creator>alepage</dc:creator>
    <dc:date>2023-05-18T14:39:52Z</dc:date>
    <item>
      <title>how to generate a macro variable for each row using Call symputx</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-a-macro-variable-for-each-row-using-Call-symputx/m-p/876470#M42984</link>
      <description>&lt;P&gt;How to generate a new macro variable for each row?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data ConsentInfo&amp;amp;j.;
length record $4000;
set info_1;
i=_n_;
record=cats("'", '{ "firstName" : ',' "',firstName,'", ',' "lastName" : ','"',lastName,'", ','"email" :',
'"',email,'"}',"'");
call symputx('NewRecord',record,'g');	
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 May 2023 14:39:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-a-macro-variable-for-each-row-using-Call-symputx/m-p/876470#M42984</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2023-05-18T14:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate a macro variable for each row using Call symputx</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-a-macro-variable-for-each-row-using-Call-symputx/m-p/876475#M42985</link>
      <description>&lt;P&gt;You have to use a different macro variable NAME to prevent writing the same macro variable over and over.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;call symputx(cats('NewRecord',i),record,'g');	&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 May 2023 14:54:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-a-macro-variable-for-each-row-using-Call-symputx/m-p/876475#M42985</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-05-18T14:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate a macro variable for each row using Call symputx</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-a-macro-variable-for-each-row-using-Call-symputx/m-p/876499#M42986</link>
      <description>&lt;P&gt;Is it possible to add a %put NewRecord || i;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If after that I do a call execute how can I passed each macro variable&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 15:45:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-a-macro-variable-for-each-row-using-Call-symputx/m-p/876499#M42986</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2023-05-18T15:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate a macro variable for each row using Call symputx</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-a-macro-variable-for-each-row-using-Call-symputx/m-p/876504#M42988</link>
      <description>&lt;P&gt;Are you asking how to USE the macro variables once you have them?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can type their full name:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put &amp;amp;NewRecord1 ;
%put &amp;amp;NewRecord2 ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can use another macro variable to help you build up the name you want to reference.&amp;nbsp; You will need to double up the first &amp;amp;.&amp;nbsp; The &amp;amp;&amp;amp; will be converted to &amp;amp; and signal to the macro processor to scan the text again to resolve the resulting macro variable reference.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let i=1;
%put &amp;amp;&amp;amp;NewRecord&amp;amp;i ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 May 2023 15:57:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/how-to-generate-a-macro-variable-for-each-row-using-Call-symputx/m-p/876504#M42988</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-05-18T15:57:23Z</dc:date>
    </item>
  </channel>
</rss>

