<?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: creating a list of values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498110#M132271</link>
    <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried this but I am getting like below&amp;nbsp; it started with a pipe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;|2|3|1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thought it should be like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2|3|1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Sat, 22 Sep 2018 20:16:45 GMT</pubDate>
    <dc:creator>jhh197</dc:creator>
    <dc:date>2018-09-22T20:16:45Z</dc:date>
    <item>
      <title>creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498098#M132260</link>
      <description>&lt;P&gt;I have couple of macro variables which has values and I want to create a list of those values for each variable into one and the final list should be&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let xp1 = 2;&lt;/P&gt;&lt;P&gt;%let xp2 = 3;&lt;/P&gt;&lt;P&gt;%let xp3 = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;%do i=1 %to 3;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; %if &amp;amp;i=1 %then %do;&lt;BR /&gt;&amp;nbsp;%let&amp;nbsp;y = &amp;amp;&amp;amp;xp&amp;amp;i._crs;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %end;&lt;BR /&gt;&amp;nbsp;%else %do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let y =%sysfunc(catx(|,&amp;amp;y,&amp;amp;&amp;amp;xp&amp;amp;i._crs));&lt;BR /&gt;&amp;nbsp;%end;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;%put &amp;amp;y;&lt;/P&gt;&lt;P&gt;so value of y should be 2|3|1&amp;nbsp; after the loop is completed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone please help&lt;/P&gt;</description>
      <pubDate>Sat, 22 Sep 2018 18:46:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498098#M132260</guid>
      <dc:creator>jhh197</dc:creator>
      <dc:date>2018-09-22T18:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498100#M132261</link>
      <description>Hi, where does the "_crs" fit -- when you show the value of &amp;amp;Y, you do NOT show the string _crs.&lt;BR /&gt;&lt;BR /&gt;I would expect you to get messages of the form:&lt;BR /&gt;WARNING: Apparent symbolic reference XP1_CRS not resolved.&lt;BR /&gt; and I would expect you'd see those messages for each of your XP1, XP2 and XP3 macro variables.&lt;BR /&gt;&lt;BR /&gt;What is the purpose of the _crs???&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Sat, 22 Sep 2018 19:11:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498100#M132261</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-09-22T19:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498101#M132262</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%let xp1 =2;

%let xp2 =3;

%let xp3 =1;


%macro l;
%let list=%str();
%do i=1 %to 3;
%put &amp;amp;&amp;amp;xp&amp;amp;i;
%let list=&amp;amp;list|&amp;amp;&amp;amp;xp&amp;amp;i;
%end;
%mend l;
%l&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 22 Sep 2018 19:12:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498101#M132262</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-22T19:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498102#M132263</link>
      <description>&lt;P&gt;And i am baffled why this is troubling me&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

%let xp1 =2;

%let xp2 =3;

%let xp3 =1;
/*works fine*/
%let list=%sysfunc(catx(|,&amp;amp;xp1,&amp;amp;xp2,&amp;amp;xp3));

%put &amp;amp;list;
/*does not work*/
%macro l;
%let list=%str();
%do i=1 %to 3;
%put &amp;amp;&amp;amp;xp&amp;amp;i;
%let list=%sysfunc(catx(|,&amp;amp;list,&amp;amp;&amp;amp;xp&amp;amp;i));
%end;
%mend l;
%l
%put &amp;amp;list;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 22 Sep 2018 19:15:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498102#M132263</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-22T19:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498103#M132264</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;oh the % let statements should be like below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let xp1_crs = 2;&lt;/P&gt;&lt;P&gt;%let xp2_crs = 3;&lt;/P&gt;&lt;P&gt;%let xp3_crs = 1;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Sep 2018 19:19:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498103#M132264</guid>
      <dc:creator>jhh197</dc:creator>
      <dc:date>2018-09-22T19:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498104#M132265</link>
      <description>&lt;P&gt;Yes . the first code would work and can be used when we have three variables . But I wanted to do this in a do loop since I don't want to mention &amp;amp;x1 , &amp;amp;x2 , &amp;amp;x3&amp;nbsp;as &amp;nbsp;I have 250 variables from x1 to x250&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 22 Sep 2018 19:26:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498104#M132265</guid>
      <dc:creator>jhh197</dc:creator>
      <dc:date>2018-09-22T19:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498105#M132266</link>
      <description>&lt;P&gt;did you try the previous post of mine&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here again&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let xp1 =2;

%let xp2 =3;

%let xp3 =1;


%macro l;
%let list=%str();
%do i=1 %to 3;
%put &amp;amp;&amp;amp;xp&amp;amp;i;
%let list=&amp;amp;list|&amp;amp;&amp;amp;xp&amp;amp;i;
%end;
%mend l;
%l&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 22 Sep 2018 19:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498105#M132266</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-22T19:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498106#M132267</link>
      <description>&lt;P&gt;that works for your many variables as the below test confirms&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%macro c;
%do i=1 %to 250;
%let xp&amp;amp;i=&amp;amp;i;
%end;
%let list=%str();
%do i=1 %to 250;
%put &amp;amp;&amp;amp;xp&amp;amp;i;
%let list=&amp;amp;list|&amp;amp;&amp;amp;xp&amp;amp;i;
%end;
%mend c;
%c

%put &amp;amp;list;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 22 Sep 2018 19:51:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498106#M132267</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-22T19:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498107#M132268</link>
      <description>Hi:&lt;BR /&gt;  I'm confused. Are you trying to use a MACRO %DO loop to concatenate 250 -macro- variables or 250 dataset variables???&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Sat, 22 Sep 2018 19:59:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498107#M132268</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-09-22T19:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498109#M132270</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;xp1_crs , xp2_crs and xp3_crs are already getting resolved in the macro and now I am using these values to prepare a list&lt;/P&gt;&lt;P&gt;like 2|3|1 so the values&amp;nbsp;2 is the value of xp1_crs and value&amp;nbsp;3 is the value of macro variable xp2_crs and the value of 1 is the value of xp3_crs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am trying to concatenate&amp;nbsp; macro variable values&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 22 Sep 2018 20:10:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498109#M132270</guid>
      <dc:creator>jhh197</dc:creator>
      <dc:date>2018-09-22T20:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498110#M132271</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried this but I am getting like below&amp;nbsp; it started with a pipe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;|2|3|1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thought it should be like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2|3|1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 22 Sep 2018 20:16:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498110#M132271</guid>
      <dc:creator>jhh197</dc:creator>
      <dc:date>2018-09-22T20:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498111#M132272</link>
      <description>&lt;P&gt;i assumed you would have done this simple adjustment&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;%put %substr(&amp;amp;list,2);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Sep 2018 20:17:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498111#M132272</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-22T20:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498115#M132274</link>
      <description>&lt;P&gt;or you could even try extracting from macro dictionary&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%let xp1 =2;

%let xp2 =3;

%let xp3 =1;
/*filter macro dictionary if name=:'XP'*/

data _null_;
do until(l);
set sashelp.vmacro(keep=name) end=l;
length temp $20;
if name=:'XP' then temp=catx('|',temp,cats('&amp;amp;',name));
if l then call symputx('list',temp);
end;
run;

%put list=&amp;amp;list;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;LOG:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;978&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;979 %put list=&amp;amp;list;&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;list=2|3|1&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Sep 2018 21:05:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498115#M132274</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-22T21:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498116#M132275</link>
      <description>&lt;P&gt;A simple change gets rid of the extra pipe:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token macrobound"&gt;%macro&lt;/SPAN&gt; c&lt;SPAN class="token punctuation"&gt;;&lt;BR /&gt;%global list;&lt;BR /&gt;%local i;&lt;BR /&gt;&lt;/SPAN&gt;%let list = &amp;amp;xp1;
&lt;SPAN class="token macrostatement"&gt;%do&lt;/SPAN&gt; i&lt;SPAN class="token operator"&gt;=2&lt;/SPAN&gt; &lt;SPAN class="token macrostatement"&gt;%to&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;250&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token macroname"&gt;%let&lt;/SPAN&gt; list&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;list&lt;SPAN class="token operator"&gt;|&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;xp&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;i&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token macrostatement"&gt;%end&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token macrobound"&gt;%mend&lt;/SPAN&gt; c&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token macroname"&gt;%c&lt;/SPAN&gt;

&lt;SPAN class="token macrostatement"&gt;%put&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;list&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 22 Sep 2018 21:17:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498116#M132275</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-09-22T21:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498118#M132277</link>
      <description>&lt;P&gt;wouldn't that miss&amp;nbsp;xp1 value?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: Sorry let me run and understand. My apologies&lt;/P&gt;</description>
      <pubDate>Sat, 22 Sep 2018 21:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498118#M132277</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-22T21:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498120#M132279</link>
      <description>&lt;P&gt;I hate this editor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No, the XP1 value is captured by the first %LET statement.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Sep 2018 21:29:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498120#M132279</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-09-22T21:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498129#M132282</link>
      <description>But, did you originally create the macro variable values from data that was in a dataset?</description>
      <pubDate>Sat, 22 Sep 2018 22:11:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498129#M132282</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-09-22T22:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498138#M132288</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Cynthia ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes I have created it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2018 01:14:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498138#M132288</guid>
      <dc:creator>jhh197</dc:creator>
      <dc:date>2018-09-23T01:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498145#M132293</link>
      <description>&lt;P&gt;&lt;BR /&gt;I am so confused why below code doesn't work and y doesn't resolve to 2|3|1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let xp1 = 2;&lt;/P&gt;&lt;P&gt;%let xp2 = 3;&lt;/P&gt;&lt;P&gt;%let xp3 = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;%do i=1 %to 3;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; %if &amp;amp;i=1 %then %do;&lt;BR /&gt;&amp;nbsp;%let&amp;nbsp;y = &amp;amp;&amp;amp;xp&amp;amp;i._crs;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %end;&lt;BR /&gt;&amp;nbsp;%else %do;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let y =%sysfunc(catx(|,&amp;amp;y,&amp;amp;&amp;amp;xp&amp;amp;i._crs));&lt;BR /&gt;&amp;nbsp;%end;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;%put &amp;amp;y;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2018 01:38:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498145#M132293</guid>
      <dc:creator>jhh197</dc:creator>
      <dc:date>2018-09-23T01:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: creating a list of values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498151#M132298</link>
      <description>What Cynthia is trying to mention, is that this would drastically easier in a data set. In fact it's trivial. &lt;BR /&gt;&lt;BR /&gt;XP = catx('|', of xp1-xp250);</description>
      <pubDate>Sun, 23 Sep 2018 02:02:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-list-of-values/m-p/498151#M132298</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-09-23T02:02:53Z</dc:date>
    </item>
  </channel>
</rss>

