<?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: parameter with arguments with plus sign in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489229#M127691</link>
    <description>&lt;P&gt;The question is: what will you be doing with that "vector"? There is a fair chance that you can do that directly off the dataset.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Aug 2018 12:38:51 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-08-23T12:38:51Z</dc:date>
    <item>
      <title>parameter with arguments with plus sign</title>
      <link>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489187#M127665</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;Let's say that in vector parameter we have 5 arguments:&lt;/P&gt;&lt;P&gt;current month+previous month+last DEC+same month previous year+last month previous quarter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sometimes some arguments are same.&lt;/P&gt;&lt;P&gt;for example:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;current month=1807&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;previous month=1806&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;last DEC=1712&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;same month previous year=1707&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;last month previous quarter=1806&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;vector=1807+1806+1712+1707+1806;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How can I tell sas that in case that there are identical arguments in &amp;amp;vector parameter to &amp;nbsp;leave only one of them.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so I want that &amp;nbsp; &amp;nbsp;vector=1807+1806+1712+1707;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 10:19:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489187#M127665</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-08-23T10:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: parameter with arguments with plus sign</title>
      <link>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489192#M127667</link>
      <description>&lt;P&gt;Store data in a dataset, then use Base SAS datasteps and procedures to manipulate data.&amp;nbsp; This is the fundamental of SAS programming.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 10:31:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489192#M127667</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-23T10:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: parameter with arguments with plus sign</title>
      <link>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489193#M127668</link>
      <description>&lt;P&gt;If you kept your data in a small dataset (which is the sensible thing to do) instead of a macro variable (which is usually not the smartest thing to do - I'm being polite here!), you'd only need a sort nodupkey or a select distinct.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 10:32:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489193#M127668</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-23T10:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: parameter with arguments with plus sign</title>
      <link>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489203#M127673</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;You are telling me to store the information in data set and then take distinct values.&lt;/P&gt;&lt;P&gt;But ,I get the data in parameter as I showed so we need to search for solution &amp;nbsp;from here.&lt;/P&gt;&lt;P&gt;There is no data set.&lt;/P&gt;&lt;P&gt;How can I create a data set from information in parameter?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 11:07:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489203#M127673</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-08-23T11:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: parameter with arguments with plus sign</title>
      <link>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489205#M127675</link>
      <description>&lt;P&gt;Read it into a data set. Then manipulate it.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 11:10:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489205#M127675</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-08-23T11:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: parameter with arguments with plus sign</title>
      <link>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489206#M127676</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data quarters (keep=quarter);
length quarter $4;
do i = 1 to countw("&amp;amp;param","+");
  quarter = scan("&amp;amp;param",i,"+");
  output;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and you got a nice dataset from which to work.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 11:10:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489206#M127676</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-23T11:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: parameter with arguments with plus sign</title>
      <link>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489225#M127689</link>
      <description>&lt;P&gt;So now from the &amp;amp;vector parameter I created a data set.&lt;/P&gt;&lt;P&gt;Then I took the distinct values.&lt;/P&gt;&lt;P&gt;Now I need to create again a parameter with multiple values with + between them&lt;/P&gt;&lt;P&gt;I should I do the final step please?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let vector=1807+1806+1712+1806;

data tbl1 (keep=YYMM);
length YYMM $4;
do i = 1 to countw("&amp;amp;vector","+");
  YYMM = scan("&amp;amp;vector",i,"+");
  output;
end;
run;

PROC SQL;
	create table tbl2 as
	select 	 distinct YYMM  
	from tbl1
;
QUIT;

/*Now I want to create a parameter called  &amp;amp;vector2 that will get the values in table tbl2 with + symbol between values*/&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Aug 2018 12:35:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489225#M127689</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-08-23T12:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: parameter with arguments with plus sign</title>
      <link>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489229#M127691</link>
      <description>&lt;P&gt;The question is: what will you be doing with that "vector"? There is a fair chance that you can do that directly off the dataset.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 12:38:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/parameter-with-arguments-with-plus-sign/m-p/489229#M127691</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-23T12:38:51Z</dc:date>
    </item>
  </channel>
</rss>

