<?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: Create SAS parameters from values in data set in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-SAS-parameters-from-values-in-data-set/m-p/489865#M128001</link>
    <description>&lt;P&gt;Just to be clear, what you are trying to create are macro variables, not parameters. Change your data step to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data tbl2;
SET Raw_tbl;
VAR_NAME='m'||strip(_N_);
call symputx(VAR_NAME,YYMM);
Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 26 Aug 2018 05:35:26 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2018-08-26T05:35:26Z</dc:date>
    <item>
      <title>Create SAS parameters from values in data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-SAS-parameters-from-values-in-data-set/m-p/489864#M128000</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have an external input data set &amp;nbsp;with &amp;nbsp;varaible "YYMM" that includes in this example 4 rows.&lt;/P&gt;&lt;P&gt;The target is to create 4 parameters called: m1,m2,m3,m4.&lt;/P&gt;&lt;P&gt;parameter &amp;amp;m1 &amp;nbsp;will recieve value&amp;nbsp;of varaible "YYMM" in row 1.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;parameter &amp;amp;m2 &amp;nbsp;will recieve value&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;of varaible "YYMM" in row 2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;parameter &amp;amp;m3 &amp;nbsp;will recieve value&amp;nbsp;of varaible "YYMM" in row 3.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;parameter &amp;amp;m4 &amp;nbsp;will recieve value&amp;nbsp;of varaible "YYMM" in row 4.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am trying to it but I don't receive&amp;nbsp;the &amp;nbsp;requested result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please find the code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ron&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA Raw_tbl;
INPUT YYMM;
CARDS;
1807
1806
1712
1707
;
RUN;


Data tbl2;
SET Raw_tbl;
VAR_NAME='m'||strip(_N_);
call symputx('VAR_NAME',VAR_NAME);
Run;

%put &amp;amp;m1; 
%put &amp;amp;m2; 
%put &amp;amp;m3; 
%put &amp;amp;m4; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 26 Aug 2018 05:23:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-SAS-parameters-from-values-in-data-set/m-p/489864#M128000</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-08-26T05:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Create SAS parameters from values in data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-SAS-parameters-from-values-in-data-set/m-p/489865#M128001</link>
      <description>&lt;P&gt;Just to be clear, what you are trying to create are macro variables, not parameters. Change your data step to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data tbl2;
SET Raw_tbl;
VAR_NAME='m'||strip(_N_);
call symputx(VAR_NAME,YYMM);
Run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 26 Aug 2018 05:35:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-SAS-parameters-from-values-in-data-set/m-p/489865#M128001</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-08-26T05:35:26Z</dc:date>
    </item>
  </channel>
</rss>

