<?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: How to create a table from a prompt values in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-create-a-table-from-a-prompt-values/m-p/506577#M32327</link>
    <description>&lt;P&gt;1. Figure out what your code would look like without macro variables&lt;/P&gt;
&lt;P&gt;2. Then replace the parts that are needed with the macro variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're having trouble please post your working, tested code and the macro variable you've created and we can likely help from there. I suspect that code you've posted does not meet #1, but I'll wait for your response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/150360"&gt;@rodrichiez&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How could I create a table from a list of value enter in a prompt? The type of prompt is a multi line text where the user enter a list of more than 800 account numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By now I've done this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%LET&amp;nbsp;Accounts = &amp;amp;NR_Accounts;&lt;/P&gt;
&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE WORK.Accounts&amp;nbsp;(Acct num);&lt;BR /&gt;INSERT INTO WORK.Accounts&lt;BR /&gt;SELECT *&lt;BR /&gt;FROM &amp;amp;Accounts;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Oct 2018 19:14:17 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-10-22T19:14:17Z</dc:date>
    <item>
      <title>How to create a table from a prompt values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-create-a-table-from-a-prompt-values/m-p/506565#M32326</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How could I create a table from a list of value enter in a prompt? The type of prompt is a multi line text where the user enter a list of more than 800 account numbers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By now I've done this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%LET&amp;nbsp;Accounts = &amp;amp;NR_Accounts;&lt;/P&gt;&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE WORK.Accounts&amp;nbsp;(Acct num);&lt;BR /&gt;INSERT INTO WORK.Accounts&lt;BR /&gt;SELECT *&lt;BR /&gt;FROM &amp;amp;Accounts;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 18:44:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-create-a-table-from-a-prompt-values/m-p/506565#M32326</guid>
      <dc:creator>rodrichiez</dc:creator>
      <dc:date>2018-10-22T18:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table from a prompt values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-create-a-table-from-a-prompt-values/m-p/506577#M32327</link>
      <description>&lt;P&gt;1. Figure out what your code would look like without macro variables&lt;/P&gt;
&lt;P&gt;2. Then replace the parts that are needed with the macro variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're having trouble please post your working, tested code and the macro variable you've created and we can likely help from there. I suspect that code you've posted does not meet #1, but I'll wait for your response.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/150360"&gt;@rodrichiez&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How could I create a table from a list of value enter in a prompt? The type of prompt is a multi line text where the user enter a list of more than 800 account numbers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By now I've done this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%LET&amp;nbsp;Accounts = &amp;amp;NR_Accounts;&lt;/P&gt;
&lt;P&gt;PROC SQL;&lt;BR /&gt;CREATE TABLE WORK.Accounts&amp;nbsp;(Acct num);&lt;BR /&gt;INSERT INTO WORK.Accounts&lt;BR /&gt;SELECT *&lt;BR /&gt;FROM &amp;amp;Accounts;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 19:14:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-create-a-table-from-a-prompt-values/m-p/506577#M32327</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-22T19:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table from a prompt values</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-create-a-table-from-a-prompt-values/m-p/506580#M32328</link>
      <description>&lt;P&gt;Below might work for you. Note: This will capture only the values that were selected in prompt not all that exist for the prompt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This should run in the program where prompt is linked.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let Accounts=1 2 3 4 5 6 7;

%macro prompt_list();
data test;
format pmt_val $3.;
%do i=1 %to %sysfunc(countw("&amp;amp;Accounts."));
Pmt_val=%scan(%bquote(&amp;amp;Accounts.),&amp;amp;i,%str( ));
output;
%end;
run;
%mend;
%prompt_list;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Oct 2018 19:21:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-create-a-table-from-a-prompt-values/m-p/506580#M32328</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-10-22T19:21:21Z</dc:date>
    </item>
  </channel>
</rss>

