<?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: check which data sets with name ttt are in work library and put the list on macro var in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/check-which-data-sets-with-name-ttt-are-in-work-library-and-put/m-p/827787#M10493</link>
    <description>&lt;P&gt;On a new SAS session, you will see this:&lt;/P&gt;
&lt;PRE&gt; 102        Proc sql noprint;
 103           select memname into : VVV separated by '+'
 104           from dictionary.tables
 105           where compress(libname)='WORK' AND  compress(memname) like 'ttt%'
 106           ;
 NOTE: No rows were selected.
 107        run;
 NOTE: PROC SQL statements are executed immediately; The RUN statement has no effect.
 108        %put &amp;amp;VVV;
 WARNING: Apparent symbolic reference VVV not resolved.
&lt;/PRE&gt;
&lt;P&gt;so I take it that your macro variable was already defined from a previous attempt.&lt;/P&gt;
&lt;P&gt;Libnames and memnames are always uppercase in the DICTIONARY tables/views.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Aug 2022 09:51:06 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-08-09T09:51:06Z</dc:date>
    <item>
      <title>check which data sets with name ttt are in work library and put the list on macro var</title>
      <link>https://communities.sas.com/t5/SAS-Studio/check-which-data-sets-with-name-ttt-are-in-work-library-and-put/m-p/827771#M10489</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I want to check which data sets with start 'ttt'&amp;nbsp; are in WORK library and put them in a macro variable with separation by '+'.&lt;/P&gt;
&lt;P&gt;In this case the required macro variable will get value ttt1+ttt2+ttt3.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the way to do it please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
Data ttt1;
input ID;
cards
;
2
;
run;

Data ttt2;
input ID;
cards
;
3
;
run;

Data ttt3;
input ID;
cards
;
4
;
run;

Data www;
input City $;
cards
;
Athens
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2022 08:25:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/check-which-data-sets-with-name-ttt-are-in-work-library-and-put/m-p/827771#M10489</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-08-09T08:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: check which data sets with name ttt are in work library and put the list on macro var</title>
      <link>https://communities.sas.com/t5/SAS-Studio/check-which-data-sets-with-name-ttt-are-in-work-library-and-put/m-p/827774#M10490</link>
      <description>&lt;P&gt;Use PROC SQL, and SELECT &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/sqlproc/n1tupenuhmu1j0n19d3curl9igt4.htm#n0npruwx8vqqhun1okbko9ypcwed" target="_blank" rel="noopener"&gt;INTO&lt;/A&gt; with SEPARATED BY from &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/sqlproc/n02s19q65mw08gn140bwfdh7spx7.htm" target="_blank" rel="noopener"&gt;DICTIONARY.TABLES&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 08:32:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/check-which-data-sets-with-name-ttt-are-in-work-library-and-put/m-p/827774#M10490</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-08-09T08:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: check which data sets with name ttt are in work library and put the list on macro var</title>
      <link>https://communities.sas.com/t5/SAS-Studio/check-which-data-sets-with-name-ttt-are-in-work-library-and-put/m-p/827777#M10491</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;In the result I get also data sets that are not "ttt" , why??&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data ttt1;
input ID;
cards
;
2
;
run;

Data ttt2;
input ID;
cards
;
3
;
run;

Data ttt3;
input ID;
cards
;
4
;
run;

Data www;
input City $;
cards
;
Athens
;
run;


Proc sql noprint;
   select memname into : VVV separated by '+'
   from dictionary.tables 
   where compress(libname)='WORK' AND  compress(memname) like 'ttt%'
   ;
run;
%put &amp;amp;VVV;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2022 08:51:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/check-which-data-sets-with-name-ttt-are-in-work-library-and-put/m-p/827777#M10491</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-08-09T08:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: check which data sets with name ttt are in work library and put the list on macro var</title>
      <link>https://communities.sas.com/t5/SAS-Studio/check-which-data-sets-with-name-ttt-are-in-work-library-and-put/m-p/827785#M10492</link>
      <description>&lt;P&gt;Strange,&lt;/P&gt;
&lt;P&gt;this query work well&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc sql noprint;
   select memname into : VVV separated by '+'
   from dictionary.tables 
   where UPCASE(libname)='WORK' 
			AND  UPCASE(memname) like 'TTT%'
   ;
run;
%put &amp;amp;VVV;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Aug 2022 09:29:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/check-which-data-sets-with-name-ttt-are-in-work-library-and-put/m-p/827785#M10492</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-08-09T09:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: check which data sets with name ttt are in work library and put the list on macro var</title>
      <link>https://communities.sas.com/t5/SAS-Studio/check-which-data-sets-with-name-ttt-are-in-work-library-and-put/m-p/827787#M10493</link>
      <description>&lt;P&gt;On a new SAS session, you will see this:&lt;/P&gt;
&lt;PRE&gt; 102        Proc sql noprint;
 103           select memname into : VVV separated by '+'
 104           from dictionary.tables
 105           where compress(libname)='WORK' AND  compress(memname) like 'ttt%'
 106           ;
 NOTE: No rows were selected.
 107        run;
 NOTE: PROC SQL statements are executed immediately; The RUN statement has no effect.
 108        %put &amp;amp;VVV;
 WARNING: Apparent symbolic reference VVV not resolved.
&lt;/PRE&gt;
&lt;P&gt;so I take it that your macro variable was already defined from a previous attempt.&lt;/P&gt;
&lt;P&gt;Libnames and memnames are always uppercase in the DICTIONARY tables/views.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 09:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/check-which-data-sets-with-name-ttt-are-in-work-library-and-put/m-p/827787#M10493</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-08-09T09:51:06Z</dc:date>
    </item>
  </channel>
</rss>

