<?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: SAS Invalid data set name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Invalid-data-set-name/m-p/505334#M135310</link>
    <description>&lt;P&gt;A DATA statement like this:&amp;nbsp;data ROLAP.USER_ROLAP.SALES_TBL; is invalid. You can only have a two-stage name like:&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;data ROLAP.SALES_TBL;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please explain what you are trying to do with this program as it looks like you are reading from a Netezza table then writing the same data back to it which doesn't make sense.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Oct 2018 20:28:56 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2018-10-17T20:28:56Z</dc:date>
    <item>
      <title>SAS Invalid data set name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Invalid-data-set-name/m-p/505322#M135302</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We're using SAS V 9.04.01M4P110916&lt;/P&gt;&lt;P&gt;I'm accessing Data from a defined Library called:&lt;/P&gt;&lt;PRE&gt;%let us_mkt = server='sandntz.bkrgc.net' database='IDP_PRD_US_MARKETING' port=5480 user=&amp;amp;db2_idx. password=&amp;amp;win_pwdx.

libname ROLAP netezza &amp;amp;us_mkt. schema=USER_ROLAP

data ROLAP.USER_ROLAP.SALES_TBL;
set ROLAP.SALES_TBL;
run;&lt;/PRE&gt;&lt;P&gt;I'm getting the following errror message:&lt;/P&gt;&lt;PRE&gt;263 data ROLAP.USER_ROLAP.SALES_TBL;
______________________________
211
ERROR 211-185: Invalid data set name.

264 set ROLAP.SALES_TBL;
265 /* set USER_ROLAP.SALES_TBL; */
266 run;&lt;/PRE&gt;&lt;P&gt;If ROLAP is the correctly defined library and USER_ROLAP is the correctly defined schema. Why am I getting this error? Also FYI: Any other combination of these names gives an error where the program won't read data. I understand that ROLAP.USER_ROLAP is redundant but if I just say ROLAP.SALES_TBL in the data statement: I get the following error. Here is how the documentation says I should define it.&lt;/P&gt;&lt;PRE&gt;263 data ROLAP.SALES_TBL;
264 set USER_ROLAP.SALES_TBL;
ERROR: Libref 'USER_ROLAP' exceeds 8 characters.
ERROR: File WORK.SALES_TBL.DATA does not exist.
265 /* set USER_ROLAP.SALES_TBL; */
266 run;&lt;/PRE&gt;&lt;P&gt;Why am I getting these errors?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 20:12:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Invalid-data-set-name/m-p/505322#M135302</guid>
      <dc:creator>Tater_Salad</dc:creator>
      <dc:date>2018-10-17T20:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Invalid data set name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Invalid-data-set-name/m-p/505328#M135305</link>
      <description>&lt;PRE&gt;1.  data ROLAP.USER_ROLAP.SALES_TBL;&lt;BR /&gt;    I think there is double dot in create data set statement&lt;BR /&gt;2. &lt;BR /&gt;Can you please use &lt;BR /&gt;data work.SALES_TBL;&lt;BR /&gt;SET ROLAP.SALES_TBL;&lt;BR /&gt;RUN;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 20:29:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Invalid-data-set-name/m-p/505328#M135305</guid>
      <dc:creator>sidpesar</dc:creator>
      <dc:date>2018-10-17T20:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Invalid data set name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Invalid-data-set-name/m-p/505329#M135306</link>
      <description>&lt;P&gt;The schema is already part of the libname. Use only&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname.dataset&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;in the data statement.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 20:23:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Invalid-data-set-name/m-p/505329#M135306</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-10-17T20:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Invalid data set name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Invalid-data-set-name/m-p/505334#M135310</link>
      <description>&lt;P&gt;A DATA statement like this:&amp;nbsp;data ROLAP.USER_ROLAP.SALES_TBL; is invalid. You can only have a two-stage name like:&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;data ROLAP.SALES_TBL;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please explain what you are trying to do with this program as it looks like you are reading from a Netezza table then writing the same data back to it which doesn't make sense.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 20:28:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Invalid-data-set-name/m-p/505334#M135310</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-10-17T20:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Invalid data set name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Invalid-data-set-name/m-p/505337#M135312</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ROLAP.USER_ROLAP.SALES_TBL;
set ROLAP.SALES_TBL;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For the above you don't need to mention your schema again as 2nd level name, you already created a Library (using LIBNAME statement ROLAP) that is pointing to that schema&amp;nbsp;&lt;SPAN&gt;USER_ROLAP. ie. When ever your first level name (here ROLAP) is mentioned then it points to that particular server and schema when mentioned in Libname statement. SAS has one level or two level library reference, but you mentioned 3 level name here which is invalid. Check this &lt;A href="http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/viewer.htm#a001395075.htm" target="_self"&gt;document&amp;nbsp;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;263 data ROLAP.SALES_TBL;
264 set USER_ROLAP.SALES_TBL;
ERROR: Libref 'USER_ROLAP' exceeds 8 characters.
ERROR: File WORK.SALES_TBL.DATA does not exist.
265 /* set USER_ROLAP.SALES_TBL; */
266 run;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;For the second one you mentioned USER_ROLAP as your library which is never defined and SAS libraries must be 8 characters.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The below code works assuming you have write access( replacing the same data to same source)&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ROLAP.SALES_TBL;
set ROLAP.SALES_TBL;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;If you want to copy the data to SAS temporary location then you can either give one level name or two level name.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data SALES_TBL; /* One level name, creating temp table in WORK library*/
set ROLAP.SALES_TBL;
run;

data WORK.SALES_TBL; /* two level name, creating temp table in WORK library*/
set ROLAP.SALES_TBL;
run;

/* Both are same */&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Oct 2018 20:33:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Invalid-data-set-name/m-p/505337#M135312</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-10-17T20:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Invalid data set name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Invalid-data-set-name/m-p/505348#M135315</link>
      <description>&lt;P&gt;That did it!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you guys tell I'm brand spanking new to SAS. I was only going with what worked. and not what was text book. I'm sort of 'feeling' my way through this with mixed results. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so it looks like the data statement is saying the following&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data work.SALES_TBL; "CREATE a data set called SALES_TBL and put it in the WORK General Library."&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;PRE&gt;SET ROLAP.SALES_TBL; "Get the Data for WORK.SALES_TBL from the existing table called SALES_TBL located in ROLAP Library."&lt;/PRE&gt;&lt;PRE&gt;&lt;BR /&gt;RUN; Run it.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I'm assuming that's how it reads. Tell me if I'm wrong.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 21:04:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Invalid-data-set-name/m-p/505348#M135315</guid>
      <dc:creator>Tater_Salad</dc:creator>
      <dc:date>2018-10-17T21:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Invalid data set name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Invalid-data-set-name/m-p/505349#M135316</link>
      <description>&lt;P&gt;Basically because I have absolutely no idea what I'm doing....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Read how I figured it out in my reply above&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 21:05:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Invalid-data-set-name/m-p/505349#M135316</guid>
      <dc:creator>Tater_Salad</dc:creator>
      <dc:date>2018-10-17T21:05:28Z</dc:date>
    </item>
  </channel>
</rss>

