<?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: Error running LIBNAME statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-running-LIBNAME-statement/m-p/151240#M29849</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; I suspect that you tried to WRITE to the LEARN library. So the problem isn't your LIBNAME statement. The problem is how you are USING the LIBNAME. See&amp;nbsp; example #2 in the screen shot. As long as you READ from the LEARN location (example #1, #3), you will be OK. But you do not have WRITE access to any of the data locations on the server. So if there is an example in the book that shows something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;DATA LEARN.NEW;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;** some code;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;RUN;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Then you will have to change it to your user library or to the WORK library to test file creation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;DATA WORK.NEW;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;** some code;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;RUN;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Here is some example code that I used for the attached screen shot. I can replicate your ERROR message just by trying to write to the LEARN library -- which fails because NOBODY has WRITE access to the OnDemand server except to your user folder. You will have to write to your user folder/directory (see Example #4). The tutorial on this web page explains how to use the OnDemand server with Book data.&lt;/P&gt;&lt;P&gt;(&lt;A href="http://support.sas.com/learn/ondemand/professionals/index.html#s1=5" title="http://support.sas.com/learn/ondemand/professionals/index.html#s1=5"&gt;SAS OnDemand for Professionals&lt;/A&gt; Customer Support tab -- see videos)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Cynthia&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;libname learn '/tutorials/bookdata/learning_sas_by_example';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;**1) reading FROM the LEARN library;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;data test;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; set learn.bicycles;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;** 2) trying to write to the LEARN library;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;** will generate an error;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;data learn.new;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; set sashelp.class;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;** 3) again, reading FROM the LEARN library;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc contents data=learn._all_;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;**4) write to user directory, called MYPLACE;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;libname myplace '~/user';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;data myplace.new;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; set learn.bicycles;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11834iA7E52357594CEFDC/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="cannot_write_to_server_tutorials_loc.png" title="cannot_write_to_server_tutorials_loc.png" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11835iBED601853F1BDFFE/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="can_write_to_user_folder.png" title="can_write_to_user_folder.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Mar 2014 04:37:46 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2014-03-21T04:37:46Z</dc:date>
    <item>
      <title>Error running LIBNAME statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-running-LIBNAME-statement/m-p/151239#M29848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I am creating my own file under Window 7 with extension .sas, stating there :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;libname learn '/tutorials/bookdata/learning_sas_by_example';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and load it into PrepGuide into Program space&amp;nbsp; I am getting error message below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: User does not have appropriate authorization level for library LEARN.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;At the same time when I am loading into&amp;nbsp; PrepGuide a UNIX file like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Learning_sas_by_example, chapter04examples.sas which contains the same statement "libname learn..."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not getting errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vladimir Kievsky&lt;BR /&gt;&lt;A href="mailto:vkievsky@hotmail.com"&gt;vkievsky@hotmail.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2014 00:07:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-running-LIBNAME-statement/m-p/151239#M29848</guid>
      <dc:creator>vkievsky</dc:creator>
      <dc:date>2014-03-21T00:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error running LIBNAME statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-running-LIBNAME-statement/m-p/151240#M29849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; I suspect that you tried to WRITE to the LEARN library. So the problem isn't your LIBNAME statement. The problem is how you are USING the LIBNAME. See&amp;nbsp; example #2 in the screen shot. As long as you READ from the LEARN location (example #1, #3), you will be OK. But you do not have WRITE access to any of the data locations on the server. So if there is an example in the book that shows something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;DATA LEARN.NEW;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;** some code;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;RUN;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Then you will have to change it to your user library or to the WORK library to test file creation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;DATA WORK.NEW;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;** some code;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;RUN;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Here is some example code that I used for the attached screen shot. I can replicate your ERROR message just by trying to write to the LEARN library -- which fails because NOBODY has WRITE access to the OnDemand server except to your user folder. You will have to write to your user folder/directory (see Example #4). The tutorial on this web page explains how to use the OnDemand server with Book data.&lt;/P&gt;&lt;P&gt;(&lt;A href="http://support.sas.com/learn/ondemand/professionals/index.html#s1=5" title="http://support.sas.com/learn/ondemand/professionals/index.html#s1=5"&gt;SAS OnDemand for Professionals&lt;/A&gt; Customer Support tab -- see videos)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Cynthia&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;libname learn '/tutorials/bookdata/learning_sas_by_example';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;**1) reading FROM the LEARN library;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;data test;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; set learn.bicycles;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;** 2) trying to write to the LEARN library;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;** will generate an error;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;data learn.new;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp; set sashelp.class;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;** 3) again, reading FROM the LEARN library;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;proc contents data=learn._all_;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;**4) write to user directory, called MYPLACE;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;libname myplace '~/user';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;data myplace.new;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; set learn.bicycles;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11834iA7E52357594CEFDC/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="cannot_write_to_server_tutorials_loc.png" title="cannot_write_to_server_tutorials_loc.png" /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11835iBED601853F1BDFFE/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="can_write_to_user_folder.png" title="can_write_to_user_folder.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Mar 2014 04:37:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-running-LIBNAME-statement/m-p/151240#M29849</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2014-03-21T04:37:46Z</dc:date>
    </item>
  </channel>
</rss>

