<?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: proc dataset select 2 or more datasæt? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292527#M60732</link>
    <description>&lt;P&gt;every library will gets its own proc datasets step;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;first.library&lt;/STRONG&gt; means the first apearance of &lt;U&gt;each&lt;/U&gt; library;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shmuel&lt;/P&gt;</description>
    <pubDate>Thu, 18 Aug 2016 18:47:55 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2016-08-18T18:47:55Z</dc:date>
    <item>
      <title>proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/291940#M60511</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to select more than one dataset in proc dataset??? eg. dynamically?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to put the same attrubutes and labels on a list of data (the list of the data is in a SAS datasæt).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All ideas to get the job done are appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thinkt the code somthing like this - but it fails ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;datasets&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;lib&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;=XXX &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;nolist&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;modify&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; table_x table_y ;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xattr&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;add&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; Type=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Area_X"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xattr&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;add&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DS&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; Contact=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Unit_U"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rgrds,&lt;/P&gt;&lt;P&gt;Annette&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 16:24:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/291940#M60511</guid>
      <dc:creator>ANLYNG</dc:creator>
      <dc:date>2016-08-16T16:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/291949#M60512</link>
      <description>&lt;P&gt;You can only select one data set at a time, but you can still select dynamically and get to all of them one at a time.&amp;nbsp; For example, this would work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="lia-quilt-row lia-quilt-row-forum-message-main"&gt;
&lt;DIV class="lia-quilt-column lia-quilt-column-20 lia-quilt-column-right lia-quilt-column-main-right"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-right"&gt;
&lt;DIV id="messagebodydisplay_0" class="lia-message-body"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;datasets&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;lib&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=XXX &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;nolist&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;modify&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; table_x;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xattr&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;add&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Type=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Area_X"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xattr&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;add&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Contact=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Unit_U"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;modify&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; table_y;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xattr&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;add&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Type=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Area_X"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;xattr&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;add&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;DS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Contact=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Unit_U"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;quit;&lt;/FONT&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 17:00:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/291949#M60512</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-08-16T17:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/291969#M60514</link>
      <description>&lt;P&gt;You can use SAS macro to shorten your code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro shr; &amp;nbsp; &amp;nbsp;/* you may add as much common lines as need */&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;xattr&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;add&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;DS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Type=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;"Area_X"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;xattr&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;add&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;DS&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; Contact=&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;"Unit_U"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;%mend;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;datasets&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;lib&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=XXX &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;nolist&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;modify&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; table_x; &amp;nbsp;%shr;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;modify&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; table_y; %shr;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;quit;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;I'm not sure is it possible to modify more than one file at a time.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;Anyway ther is no need to copy shared lines. It can be done easily by macro;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;Please check it;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 18:12:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/291969#M60514</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-08-16T18:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292179#M60597</link>
      <description>&lt;P&gt;I wish to make it more dynamically. eg. do you have an example if i put the classification in an variable in a data set (together with dataset name) and how to loop it into a dynamic macro variable which rund through the data set?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 13:56:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292179#M60597</guid>
      <dc:creator>ANLYNG</dc:creator>
      <dc:date>2016-08-17T13:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292238#M60613</link>
      <description>&lt;P&gt;It sounds like it would be easy. &amp;nbsp;But it's not clear what the incoming data would look like, and how it is supposed to be used by the program. &amp;nbsp;Can you give an example?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 17:37:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292238#M60613</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-08-17T17:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292255#M60617</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;I have attached a SAS program - an example.&lt;/P&gt;&lt;P&gt;First two steps were to create test data, the rest is a code&amp;nbsp;to add label and change format of variables.&lt;/P&gt;&lt;P&gt;Run the 1st two steps and look at the data sets: the date is not formated and the variable i &amp;nbsp;- should be labeled as "KEY".&lt;/P&gt;&lt;P&gt;Now run the rest of the pragram (or the whole program as one unit);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Look at the log: using "options mprint" in the program enables demostrate how the macro is developed and embeded;&lt;/P&gt;&lt;P&gt;Look again at the datasests EXPML1 and EXMPL2; change to view labels&lt;/P&gt;&lt;P&gt;instead of columns. You will see the outcome of the MODIFY statements;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With hope it is more clear now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shmuel&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 18:55:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292255#M60617</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-08-17T18:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292256#M60618</link>
      <description>&lt;P&gt;I don't understand your situation.&lt;/P&gt;&lt;P&gt;What do you mean by "...&lt;SPAN&gt;put the classification in an variable in a data set..." ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What do you mean by "... loop it into a dynamic macro variable which rund through the data set" ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I may help you if you give an example of your inputs and what you want to be on the outputs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Shmuel&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 19:00:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292256#M60618</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-08-17T19:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292370#M60677</link>
      <description>&lt;P&gt;What I was thinking was to make this dynamically. I have putted the classification variable into a SAS dataset. In this structure:&lt;/P&gt;&lt;P&gt;library table type &amp;nbsp;&amp;nbsp;&amp;nbsp; contact&lt;/P&gt;&lt;P&gt;XXX&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Area_X &amp;nbsp;&amp;nbsp;&amp;nbsp;Unit_U&lt;/P&gt;&lt;P&gt;YYY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; z&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Area_X &amp;nbsp;&amp;nbsp;&amp;nbsp;Unit_Z&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And wish to loop these variables and use like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;datasets&lt;/STRONG&gt; lib=&amp;amp;library. nolist;&lt;/P&gt;&lt;P&gt;modify table_&amp;amp;table.;&lt;/P&gt;&lt;P&gt;xattr add DS Type=&amp;amp;type.;&lt;/P&gt;&lt;P&gt;xattr add DS Contact=&amp;amp;contact.;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have some ideas to make it smart?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 07:30:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292370#M60677</guid>
      <dc:creator>ANLYNG</dc:creator>
      <dc:date>2016-08-18T07:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292384#M60683</link>
      <description>&lt;P&gt;I have the feeling that we use same word MODIFY but understand it differently.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc Datasets ... Modify ... enables modifying of &lt;STRONG&gt;variable attributes&lt;/STRONG&gt; like: rename, variable label, format (how to display it) etc&lt;/P&gt;&lt;P&gt;but not their value in the data set observations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have no idea what you mean by AREA_X, UNIT_Z - are those variable values that you want to replace in all observations of the data set ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please run the next code and see what RETAIN do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;retain x 'Constant'; &amp;nbsp;/* no equal sign is needed */&lt;/P&gt;&lt;P&gt;do i=1 to 5; output; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shmuel&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 09:10:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292384#M60683</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-08-18T09:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292386#M60685</link>
      <description>&lt;P&gt;the idea is that the input (libane, data and label) &amp;nbsp;is dynamic and read from a data set and used inside&amp;nbsp; proc datasets.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 09:25:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292386#M60685</guid>
      <dc:creator>ANLYNG</dc:creator>
      <dc:date>2016-08-18T09:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292421#M60694</link>
      <description>&lt;P&gt;For that situation, the right tool for the job is CALL EXECUTE. &amp;nbsp;It is a DATA step statement that lets you build code that runs after the current DATA step. &amp;nbsp;Technically, it is part of macro language, but you won't see any % or &amp;amp;. &amp;nbsp;Here's a brief example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=have;&lt;/P&gt;
&lt;P&gt;by library;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;by library;&lt;/P&gt;
&lt;P&gt;if first.library then call execute('proc datasets lib=' || library || ' nolist;');&lt;/P&gt;
&lt;P&gt;call execute('modify ' || table || ';');&lt;/P&gt;
&lt;P&gt;call execute('xattr add DS Type="' || type || '";');&lt;/P&gt;
&lt;P&gt;call execute('xattr add DS Contact="' || contact || '";');&lt;/P&gt;
&lt;P&gt;call execute('run;');&lt;/P&gt;
&lt;P&gt;if last.library then call execute('quit;');&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think I have all the pieces here, but you may have to debug as you test it.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 12:22:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292421#M60694</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-08-18T12:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292444#M60697</link>
      <description>&lt;P&gt;I got your point.&lt;/P&gt;&lt;P&gt;In this case I shall not use macro language, though it is possible but mutch more compicated.&lt;/P&gt;&lt;P&gt;Instead I shall show here a method that I have used a lot of times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let say your file contains next variables:&lt;/P&gt;&lt;P&gt;&amp;nbsp; - &amp;nbsp;&lt;STRONG&gt;LIB&lt;/STRONG&gt; stands for Library&lt;/P&gt;&lt;P&gt;&amp;nbsp; - &amp;nbsp;&lt;STRONG&gt;DSN&lt;/STRONG&gt; stand for dataset Name&lt;/P&gt;&lt;P&gt;&amp;nbsp; - &amp;nbsp;&lt;STRONG&gt;var1&lt;/STRONG&gt; contains attribute 1 &amp;nbsp;(TYPE)&lt;/P&gt;&lt;P&gt;&amp;nbsp; - &amp;nbsp;&lt;STRONG&gt;var2&lt;/STRONG&gt; contains attribute 2 &amp;nbsp;(LABEL)&lt;/P&gt;&lt;P&gt;&amp;nbsp; - &amp;nbsp;and so on, as mutch as you need&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's call your file &lt;STRONG&gt;ARGS&lt;/STRONG&gt; (arguments);&lt;/P&gt;&lt;P&gt;By the method, I write program A and run it to generate program B, using the fact that &lt;U&gt;each program is a text file&lt;/U&gt;.&lt;/P&gt;&lt;P&gt;I can look at the &lt;STRONG&gt;generated&lt;/STRONG&gt; program B, make changes to program A if needed and rerun it until satisfaction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I run program B to do the wanted job.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a schematic prgram A:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort data=&lt;STRONG&gt;ARGS&lt;/STRONG&gt;; by &lt;STRONG&gt;LIB &amp;nbsp;DSN&lt;/STRONG&gt;; run; &amp;nbsp; &amp;nbsp; /* needed for proc datasets */&lt;/P&gt;&lt;P&gt;filename generated '... any path and name ...';&lt;/P&gt;&lt;P&gt;data _NULL_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; set &lt;STRONG&gt;ARGS&lt;/STRONG&gt; end=eof;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; by &lt;STRONG&gt;LIB &amp;nbsp;DSN&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; file generated;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; length pgm_line $80; &amp;nbsp;/* generated program line. you may change length according to need */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;if first.&lt;STRONG&gt;LIB&lt;/STRONG&gt; then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pgm_line = 'Proc Datasets lib=' || &lt;STRONG&gt;LIB&lt;/STRONG&gt; || ' nolist; '; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;put pgm_line;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;if first.&lt;STRONG&gt;DSN&lt;/STRONG&gt; then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pgm_line = 'Modify ' || &lt;STRONG&gt;DSN&lt;/STRONG&gt; || ';' ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;put pgm_line;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;pgm_line = '&lt;STRONG&gt;TYPE&lt;/STRONG&gt;=' || var1 || ';' ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;put pgm_line;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;pgm_line = '&lt;STRONG&gt;LABEL&lt;/STRONG&gt;=' || var2 || ';' ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;put pgm_line;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;*** continue as much as you need ***;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;if last.&lt;STRONG&gt;LIB&lt;/STRONG&gt; or eof then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pgm_line = 'Quit; Run;' ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;put pgm_line;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;RUN; &amp;nbsp; /* &amp;nbsp;end od program A */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now run this program and look at the generated output.&lt;/P&gt;&lt;P&gt;Addapt it to your needs and rerun.&lt;/P&gt;&lt;P&gt;When satisfied, do %INCLUDE generated; and run it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope I realy got your point;&lt;/P&gt;&lt;P&gt;Shmuel&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 13:15:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292444#M60697</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-08-18T13:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292446#M60698</link>
      <description>&lt;P&gt;The outcome of "CALL EXECUTE" and the generated program are the same;&lt;/P&gt;&lt;P&gt;The benefit of generated program is the ability to stop and control before real execution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shmuel&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 13:22:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292446#M60698</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-08-18T13:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292488#M60717</link>
      <description>&lt;P&gt;Look really nice-thank you very much......it helps me....&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 16:18:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292488#M60717</guid>
      <dc:creator>ANLYNG</dc:creator>
      <dc:date>2016-08-18T16:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292499#M60725</link>
      <description>&lt;P&gt;but as far i can test it only takes the first library and not the following. ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 17:13:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292499#M60725</guid>
      <dc:creator>ANLYNG</dc:creator>
      <dc:date>2016-08-18T17:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292527#M60732</link>
      <description>&lt;P&gt;every library will gets its own proc datasets step;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;first.library&lt;/STRONG&gt; means the first apearance of &lt;U&gt;each&lt;/U&gt; library;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shmuel&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 18:47:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292527#M60732</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-08-18T18:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: proc dataset select 2 or more datasæt?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292533#M60734</link>
      <description>&lt;P&gt;i suppose it is possible to put it into the same step eg. if not first.library. i have to read on proc execute. looks very smart...&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2016 19:14:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-dataset-select-2-or-more-datas%C3%A6t/m-p/292533#M60734</guid>
      <dc:creator>ANLYNG</dc:creator>
      <dc:date>2016-08-18T19:14:42Z</dc:date>
    </item>
  </channel>
</rss>

