<?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 how to go to the next line in a %window in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-go-to-the-next-line-in-a-window/m-p/467212#M285326</link>
    <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;I created a macro variable&amp;nbsp; in this way:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;select NAME&lt;BR /&gt;into :totale separated by ' '&lt;BR /&gt;from contenst;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The log of '%put &amp;amp;totale;' is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LDL PAD PAS age altezza birth_date bmi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the window that I wrote:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%window info&lt;/P&gt;&lt;P&gt;#5 @5 'these are the variable of your dataset:'&lt;BR /&gt;#8 @5 "&amp;amp;totale"&lt;BR /&gt;#5 @60 'enter the variable you want to keep'&lt;BR /&gt;#7 @60 'names:' +1 newtot 600 attr=underline display=yes;&lt;BR /&gt;%display info;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this program I see '&lt;SPAN&gt;LDL PAD PAS age altezza birth_date bmi' in a row, but I would like to display them in a column, in this way:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;these are the variable of your dataset:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LDL &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PAS &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;age&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 03 Jun 2018 10:53:24 GMT</pubDate>
    <dc:creator>leti_ors96</dc:creator>
    <dc:date>2018-06-03T10:53:24Z</dc:date>
    <item>
      <title>how to go to the next line in a %window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-go-to-the-next-line-in-a-window/m-p/467212#M285326</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;I created a macro variable&amp;nbsp; in this way:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;select NAME&lt;BR /&gt;into :totale separated by ' '&lt;BR /&gt;from contenst;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The log of '%put &amp;amp;totale;' is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LDL PAD PAS age altezza birth_date bmi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the window that I wrote:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%window info&lt;/P&gt;&lt;P&gt;#5 @5 'these are the variable of your dataset:'&lt;BR /&gt;#8 @5 "&amp;amp;totale"&lt;BR /&gt;#5 @60 'enter the variable you want to keep'&lt;BR /&gt;#7 @60 'names:' +1 newtot 600 attr=underline display=yes;&lt;BR /&gt;%display info;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this program I see '&lt;SPAN&gt;LDL PAD PAS age altezza birth_date bmi' in a row, but I would like to display them in a column, in this way:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;these are the variable of your dataset:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LDL &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PAS &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;age&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jun 2018 10:53:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-go-to-the-next-line-in-a-window/m-p/467212#M285326</guid>
      <dc:creator>leti_ors96</dc:creator>
      <dc:date>2018-06-03T10:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to go to the next line in a %window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-go-to-the-next-line-in-a-window/m-p/467225#M285327</link>
      <description>&lt;P&gt;Forward slash will write to next line, but you need to define separate macros to put them in separate lines&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;                                                                                                                                        
%let totale1=LDL;                                                                                                                       
%let totale2=PAD;                                                                                                                       
%let totale3=PAS;                                                                                                                       
%let totale4=age;                                                                                                                       
%let totale5=altezza;                                                                                                                   
%let totale6=birth_date;                                                                                                                
%let totale7=bmi;                                                                                                                       
                                                                                                                                        
%window info                                                                                                                            
                                                                                                                                        
#5 @5 'these are the variable of your dataset:'                                                                                         
#8 @5 "&amp;amp;totale1"                                                                                                                        
 / @5 "&amp;amp;totale2"                                                                                                                        
 / @5 "&amp;amp;totale3"                                                                                                                        
 / @5 "&amp;amp;totale4"                                                                                                                        
 / @5 "&amp;amp;totale5"                                                                                                                        
 / @5 "&amp;amp;totale6"                                                                                                                        
 / @5 "&amp;amp;totale7"                                                                                                                        
#5 @60 'enter the variable you want to keep'                                                                                            
#7 @60 'names:' +1 newtot 600 attr=underline display=yes;                                                                               
%display info;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 03 Jun 2018 14:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-go-to-the-next-line-in-a-window/m-p/467225#M285327</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-06-03T14:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to go to the next line in a %window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-go-to-the-next-line-in-a-window/m-p/467232#M285328</link>
      <description>&lt;P&gt;I agree 1000% that you need a set of macro variables instead of 1.&amp;nbsp; However, I would change the interaction and requirements to make life easier for the user and to eliminate spelling mistakes.&amp;nbsp; For example:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token macrostatement"&gt;%window&lt;/SPAN&gt; info                                                                                                                            
                                                                                                                                        
#&lt;SPAN class="token number"&gt;5&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;@&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;5&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'these are the variable of your dataset:'&lt;/SPAN&gt;                                                                                         
#&lt;SPAN class="token number"&gt;8&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;@&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;5&lt;/SPAN&gt; keep1 1  attr=underline display=yes @8 &lt;SPAN class="token string"&gt;"&amp;amp;totale1"&lt;/SPAN&gt;                                                                                                                        
 &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;@&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;5 keep2 1  attr=underline display=yes &lt;/SPAN&gt;&lt;/CODE&gt;&lt;CODE class="  language-sas"&gt;@8 &lt;SPAN class="token string"&gt;"&amp;amp;totale2"&lt;/SPAN&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="token operator"&gt; /&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;@&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;5&lt;/SPAN&gt; keep3 1  attr=underline display=yes @8 &lt;SPAN class="token string"&gt;"&amp;amp;totale3"&lt;/SPAN&gt; &lt;BR /&gt;&lt;SPAN class="token operator"&gt; /&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;@......&lt;BR /&gt;&lt;/SPAN&gt;#&lt;SPAN class="token number"&gt;5&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;@&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;60&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'Put a "K" before each variable that you want to keep'&lt;/SPAN&gt; &lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you know how to get separate macro variables instead of one long one?&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jun 2018 16:56:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-go-to-the-next-line-in-a-window/m-p/467232#M285328</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-06-03T16:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to go to the next line in a %window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-go-to-the-next-line-in-a-window/m-p/467234#M285329</link>
      <description>&lt;P&gt;I don't know how to create one macro variable for each name. I have a dataset and I have to&amp;nbsp;create for each variable of the dataset a macro variable. How can I do?&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jun 2018 17:20:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-go-to-the-next-line-in-a-window/m-p/467234#M285329</guid>
      <dc:creator>leti_ors96</dc:creator>
      <dc:date>2018-06-03T17:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to go to the next line in a %window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-go-to-the-next-line-in-a-window/m-p/467269#M285330</link>
      <description>&lt;P&gt;Similar to what you did in the first place, to create a separate macro variable holding each variable's name:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;select name into : totale1 - : totale99 from contents;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My recollection (can't test it right now) is that this creates only as many macro variables as needed.&amp;nbsp; I'm assuming that 99 variables is more than enough, since you won't be able to display that many in a single window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm also concerned that you won't be able to use the results later, since it may require additional skills with macro language.&amp;nbsp; But you will have to be the judge of that.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jun 2018 22:49:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-go-to-the-next-line-in-a-window/m-p/467269#M285330</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-06-03T22:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to go to the next line in a %window</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-go-to-the-next-line-in-a-window/m-p/467271#M285331</link>
      <description>Your recollection works. Now I have to understand how to display all the macro variables in the window.</description>
      <pubDate>Sun, 03 Jun 2018 23:12:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-go-to-the-next-line-in-a-window/m-p/467271#M285331</guid>
      <dc:creator>leti_ors96</dc:creator>
      <dc:date>2018-06-03T23:12:24Z</dc:date>
    </item>
  </channel>
</rss>

