<?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 macro parameter from a dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-macro-parameter-from-a-dataset/m-p/165055#M263683</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I made a mistake. Need to switch the into: and separated &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need select name into: name_list separated by ' '&lt;/P&gt;&lt;P&gt;From dataset;&lt;/P&gt;&lt;P&gt;Quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Feb 2014 14:16:49 GMT</pubDate>
    <dc:creator>AncaTilea</dc:creator>
    <dc:date>2014-02-06T14:16:49Z</dc:date>
    <item>
      <title>Create macro parameter from a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-macro-parameter-from-a-dataset/m-p/165052#M263680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a dataset which contains one varible &lt;STRONG&gt;name &lt;/STRONG&gt;with value of&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NAME&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AMORTIZED_INCOME__REV_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BONDS_BAL_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BONDS_REV_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASA_BAL_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASA_REV_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASH_REV_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASH_SECURED__BAL_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASH_SECURED__REV_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CA_BAL_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How could I create a macro parameter &lt;STRONG&gt;varlist&lt;/STRONG&gt; from above dataset the same as I did manually as below?&lt;/P&gt;&lt;P&gt;%LET varlist = %STR( &lt;/P&gt;&lt;P&gt;AMORTIZED_INCOME__REV_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BONDS_BAL_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BONDS_REV_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASA_BAL_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASA_REV_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASH_REV_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASH_SECURED__BAL_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASH_SECURED__REV_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CA_BAL_) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 11:00:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-macro-parameter-from-a-dataset/m-p/165052#M263680</guid>
      <dc:creator>weizhongma</dc:creator>
      <dc:date>2014-02-06T11:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create macro parameter from a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-macro-parameter-from-a-dataset/m-p/165053#M263681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI.&lt;/P&gt;&lt;P&gt;One way would be to use PROC SQL and SELECT INTO:&lt;/P&gt;&lt;P&gt;Something like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT NAME SEPARATED BY "&amp;nbsp; "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO: NAME_LIST&lt;/P&gt;&lt;P&gt;FROM WORK.YOURDATA;&lt;/P&gt;&lt;P&gt;QUIT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%PUT &amp;amp;NAME_LIST;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anca.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 11:31:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-macro-parameter-from-a-dataset/m-p/165053#M263681</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2014-02-06T11:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Create macro parameter from a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-macro-parameter-from-a-dataset/m-p/165054#M263682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Anca. But I got error message.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;83 PROC SQL;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;84 SELECT NAME&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;85 SEPARATED BY " "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--------- --&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;22 202&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a quoted string, !, !!, &amp;amp;, (, *, **, +, ',', -, '.', /, &amp;lt;, &amp;lt;=, &amp;lt;&amp;gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=, &amp;gt;, &amp;gt;=, ?, AND, AS, BETWEEN, CONTAINS, EQ, EQT, FORMAT, FROM, GE, GET, GT, GTT, IN, INFORMAT, INTO, IS, LABEL,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LE, LEN, LENGTH, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, TRANSCODE, ^, ^=, |, ||, ~, ~=.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR 202-322: The option or parameter is not recognized and will be ignored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;86 INTO: NAME_LIST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;87 FROM xtest;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;88 QUIT;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 13:19:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-macro-parameter-from-a-dataset/m-p/165054#M263682</guid>
      <dc:creator>weizhongma</dc:creator>
      <dc:date>2014-02-06T13:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create macro parameter from a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-macro-parameter-from-a-dataset/m-p/165055#M263683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I made a mistake. Need to switch the into: and separated &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need select name into: name_list separated by ' '&lt;/P&gt;&lt;P&gt;From dataset;&lt;/P&gt;&lt;P&gt;Quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 14:16:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-macro-parameter-from-a-dataset/m-p/165055#M263683</guid>
      <dc:creator>AncaTilea</dc:creator>
      <dc:date>2014-02-06T14:16:49Z</dc:date>
    </item>
  </channel>
</rss>

