<?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: Appending all datasets in given library in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Appending-all-datasets-in-given-library/m-p/551489#M153237</link>
    <description>&lt;P&gt;Since you did not include the LIBRARY name in your original names of the data sets you wanted, I did not either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;PROC SQL;
   SELECT catt('Y_COMP.',quote(MEMNAME),'n') INTO : MEMNAMES SEPARATED BY ' ' 
   from dictionary.tables
   where libname='Y_COMP';
quit;&lt;/PRE&gt;
&lt;P&gt;so you need to have the LIBRARY with EACH data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I go out of the way to avoid ever working with name literals for data sets or variables as they cause lots of headaches.&lt;/P&gt;</description>
    <pubDate>Tue, 16 Apr 2019 17:58:26 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-04-16T17:58:26Z</dc:date>
    <item>
      <title>Appending all datasets in given library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-all-datasets-in-given-library/m-p/551397#M153193</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have&amp;nbsp; a list of several datasets in a library called Y_COMP which I am trying to append to each other but getting errors&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The single&amp;nbsp; quotations are also part of the names&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'DEC SUMMARY INBOUND SALES$'&lt;BR /&gt;'DEC SUMMARY OUTBOUND SALES$'&lt;BR /&gt;'DEC SUMMARY SERVICE$'&lt;BR /&gt;'FEB SUMMARY INBOUND SALES$'&lt;BR /&gt;'FEB SUMMARY OUTBOUND SALES$'&lt;BR /&gt;'FEB SUMMARY SERVICE ASSOCIATE$'&lt;BR /&gt;'JAN SUMMARY INBOUND SALES$'&lt;BR /&gt;'JAN SUMMARY OUTBOUND SALES$'&lt;BR /&gt;'JAN SUMMARY SERVICE$'&lt;BR /&gt;'MARCH SUMMARY OUTBOUND SALES$'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When running this&amp;nbsp; I am getting the error below:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;PROC SQL;&lt;BR /&gt;SELECT MEMNAME INTO : MEMNAMES SEPARATED BY ' ' from dictionary.tables&lt;BR /&gt;where libname='Y_COMP';quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA WANT;&lt;BR /&gt;SET &amp;amp;MEMNAMES.;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: THESE&amp;nbsp; FILES DONT EXIST:&lt;/P&gt;
&lt;P&gt;DEC SUMMARY INBOUND SALES$&lt;BR /&gt;DEC SUMMARY OUTBOUND SALES$&lt;BR /&gt;DEC SUMMARY SERVICE$&lt;BR /&gt;FEB SUMMARY INBOUND SALES$&lt;BR /&gt;FEB SUMMARY OUTBOUND SALES$&lt;BR /&gt;FEB SUMMARY SERVICE ASSOCIATE$&lt;BR /&gt;JAN SUMMARY INBOUND SALES$&lt;BR /&gt;JAN SUMMARY OUTBOUND SALES$&lt;BR /&gt;JAN SUMMARY SERVICE$&lt;BR /&gt;MARCH SUMMARY OUTBOUND SALES$&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and&amp;nbsp; this is&amp;nbsp; what I get when running this and&amp;nbsp; the max length of my names is 31 character&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA WANT;&lt;BR /&gt;SET "&amp;amp;MEMNAMES."n;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;ERROR 307-185: The data set name cannot have more than 32 characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any insights on this please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thx&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 15:03:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-all-datasets-in-given-library/m-p/551397#M153193</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2019-04-16T15:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Appending all datasets in given library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-all-datasets-in-given-library/m-p/551405#M153196</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34400"&gt;@Tal&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;I have&amp;nbsp; a list of several datasets in a library called Y_COMP which I am trying to append to each other but getting errors&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The single&amp;nbsp; quotations are also part of the names&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'DEC SUMMARY INBOUND SALES$'&lt;BR /&gt;'DEC SUMMARY OUTBOUND SALES$'&lt;BR /&gt;'DEC SUMMARY SERVICE$'&lt;BR /&gt;'FEB SUMMARY INBOUND SALES$'&lt;BR /&gt;'FEB SUMMARY OUTBOUND SALES$'&lt;BR /&gt;'FEB SUMMARY SERVICE ASSOCIATE$'&lt;BR /&gt;'JAN SUMMARY INBOUND SALES$'&lt;BR /&gt;'JAN SUMMARY OUTBOUND SALES$'&lt;BR /&gt;'JAN SUMMARY SERVICE$'&lt;BR /&gt;'MARCH SUMMARY OUTBOUND SALES$'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When running this&amp;nbsp; I am getting the error below:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;PROC SQL;&lt;BR /&gt;SELECT MEMNAME INTO : MEMNAMES SEPARATED BY ' ' from dictionary.tables&lt;BR /&gt;where libname='Y_COMP';quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA WANT;&lt;BR /&gt;SET &amp;amp;MEMNAMES.;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: THESE&amp;nbsp; FILES DONT EXIST:&lt;/P&gt;
&lt;P&gt;DEC SUMMARY INBOUND SALES$&lt;BR /&gt;DEC SUMMARY OUTBOUND SALES$&lt;BR /&gt;DEC SUMMARY SERVICE$&lt;BR /&gt;FEB SUMMARY INBOUND SALES$&lt;BR /&gt;FEB SUMMARY OUTBOUND SALES$&lt;BR /&gt;FEB SUMMARY SERVICE ASSOCIATE$&lt;BR /&gt;JAN SUMMARY INBOUND SALES$&lt;BR /&gt;JAN SUMMARY OUTBOUND SALES$&lt;BR /&gt;JAN SUMMARY SERVICE$&lt;BR /&gt;MARCH SUMMARY OUTBOUND SALES$&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and&amp;nbsp; this is&amp;nbsp; what I get when running this and&amp;nbsp; the max length of my names is 31 character&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA WANT;&lt;BR /&gt;SET "&amp;amp;MEMNAMES."n;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;P&gt;ERROR 307-185: The data set name cannot have more than 32 characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any insights on this please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thx&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You are not building proper name literal values. Try&lt;/P&gt;
&lt;PRE&gt;PROC SQL;
   SELECT catt(quote(MEMNAME),'n') INTO : MEMNAMES SEPARATED BY ' ' 
   from dictionary.tables
   where libname='Y_COMP';
quit;&lt;/PRE&gt;
&lt;P&gt;and do not use quotes around &amp;amp;memnames.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EACH of your names has to have the quotes and 'n'.&lt;/P&gt;
&lt;P&gt;You should have looked at what &amp;amp;memnames contained using a %put &amp;amp;memnames to see if each name was built properly for use in SET statement.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 15:19:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-all-datasets-in-given-library/m-p/551405#M153196</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-16T15:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Appending all datasets in given library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-all-datasets-in-given-library/m-p/551449#M153225</link>
      <description>&lt;P&gt;thanks for your&amp;nbsp; response ballardw but I am still getting errors:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: File WORK.'''DEC SUMMARY INBOUND SALES$'''n.DATA does not exist.&lt;/P&gt;
&lt;P&gt;ERROR: File WORK.'''DEC SUMMARY OUTBOUND SALES$'''n.DATA does not exist.&lt;/P&gt;
&lt;P&gt;ERROR: File WORK.'''DEC SUMMARY SERVICE$'''n.DATA does not exist.&lt;/P&gt;
&lt;P&gt;ERROR: File WORK.'''FEB SUMMARY INBOUND SALES$'''n.DATA does not exist.&lt;/P&gt;
&lt;P&gt;ERROR: File WORK.'''FEB SUMMARY OUTBOUND SALES$'''n.DATA does not exist.&lt;/P&gt;
&lt;P&gt;ERROR: File WORK.'''FEB SUMMARY SERVICE ASSOCIATE$'''n.DATA does not exist.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The names of my datasets originally have single quotes&amp;nbsp; for example 'DEC SUMMARY INBOUND SALES$'&amp;nbsp; so&amp;nbsp; maybe that causes the errors?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 16:48:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-all-datasets-in-given-library/m-p/551449#M153225</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2019-04-16T16:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Appending all datasets in given library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-all-datasets-in-given-library/m-p/551489#M153237</link>
      <description>&lt;P&gt;Since you did not include the LIBRARY name in your original names of the data sets you wanted, I did not either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;PROC SQL;
   SELECT catt('Y_COMP.',quote(MEMNAME),'n') INTO : MEMNAMES SEPARATED BY ' ' 
   from dictionary.tables
   where libname='Y_COMP';
quit;&lt;/PRE&gt;
&lt;P&gt;so you need to have the LIBRARY with EACH data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I go out of the way to avoid ever working with name literals for data sets or variables as they cause lots of headaches.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 17:58:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-all-datasets-in-given-library/m-p/551489#M153237</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-16T17:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Appending all datasets in given library</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Appending-all-datasets-in-given-library/m-p/551543#M153249</link>
      <description>&lt;P&gt;right,&amp;nbsp; forgot the lib name&lt;/P&gt;
&lt;P&gt;Thank you ballardw!&lt;/P&gt;
&lt;P&gt;So much appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 20:01:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Appending-all-datasets-in-given-library/m-p/551543#M153249</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2019-04-16T20:01:51Z</dc:date>
    </item>
  </channel>
</rss>

