<?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 Issue with libname in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Issue-with-libname/m-p/937839#M11338</link>
    <description>&lt;P&gt;I am trying to import a dataset that is a .dat file using prespecified code (this is for the Youth Risk Behavior Survey). Please help:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CODE:&lt;/P&gt;&lt;PRE&gt;/****************************************************************************************/
/*  This SAS program creates a permanent SAS format library that is used to analyze to  */
/*  analyze the 2007 YRBS dataset.                                                      */
/*                                                                                      */
/*  Change the file location specification from "c:\yrbs2007" to the location where you */
/*  want the format library to be stored before you run this program.  Change the       */
/*  location specification in the "library" statement at the top of the program.        */
/*                                                                                      */
/*  Note: Run "YRBS_2007_SAS_Format_Program.sas" BEFORE you run                         */
/*  "YRBS_2007_SAS_Input_Program.sas" to create the 2007 YRBS dataset.                  */
/****************************************************************************************/



libname yrbs "home/uXXXXXXXX/sasuser.v94/yrbs2007.dat";
proc format library=yrbs;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR MESSAGE:&lt;/P&gt;&lt;DIV class=""&gt;WARNING: Library YRBS does not exist.&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: Libref YRBS was successfully assigned as follows:&lt;/DIV&gt;&lt;DIV class=""&gt;Engine: V9&lt;/DIV&gt;&lt;DIV class=""&gt;Physical Name: /pbr/biconfig/940/Lev1/SASApp/home/uXXXXXXXX/sasuser.v94/yrbs2007.dat&lt;/DIV&gt;&lt;DIV class=""&gt;85 proc format library=yrbs;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: Library YRBS does not exist.&lt;/DIV&gt;&lt;PRE class=""&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jul 2024 22:47:34 GMT</pubDate>
    <dc:creator>ronaldo7</dc:creator>
    <dc:date>2024-07-31T22:47:34Z</dc:date>
    <item>
      <title>Issue with libname</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Issue-with-libname/m-p/937839#M11338</link>
      <description>&lt;P&gt;I am trying to import a dataset that is a .dat file using prespecified code (this is for the Youth Risk Behavior Survey). Please help:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CODE:&lt;/P&gt;&lt;PRE&gt;/****************************************************************************************/
/*  This SAS program creates a permanent SAS format library that is used to analyze to  */
/*  analyze the 2007 YRBS dataset.                                                      */
/*                                                                                      */
/*  Change the file location specification from "c:\yrbs2007" to the location where you */
/*  want the format library to be stored before you run this program.  Change the       */
/*  location specification in the "library" statement at the top of the program.        */
/*                                                                                      */
/*  Note: Run "YRBS_2007_SAS_Format_Program.sas" BEFORE you run                         */
/*  "YRBS_2007_SAS_Input_Program.sas" to create the 2007 YRBS dataset.                  */
/****************************************************************************************/



libname yrbs "home/uXXXXXXXX/sasuser.v94/yrbs2007.dat";
proc format library=yrbs;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR MESSAGE:&lt;/P&gt;&lt;DIV class=""&gt;WARNING: Library YRBS does not exist.&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: Libref YRBS was successfully assigned as follows:&lt;/DIV&gt;&lt;DIV class=""&gt;Engine: V9&lt;/DIV&gt;&lt;DIV class=""&gt;Physical Name: /pbr/biconfig/940/Lev1/SASApp/home/uXXXXXXXX/sasuser.v94/yrbs2007.dat&lt;/DIV&gt;&lt;DIV class=""&gt;85 proc format library=yrbs;&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR: Library YRBS does not exist.&lt;/DIV&gt;&lt;PRE class=""&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 22:47:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Issue-with-libname/m-p/937839#M11338</guid>
      <dc:creator>ronaldo7</dc:creator>
      <dc:date>2024-07-31T22:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with libname</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Issue-with-libname/m-p/937840#M11339</link>
      <description>&lt;P&gt;Since you use a RELATIVE path SAS is trying to find a directory named home under the current working directory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead make sure to use an ABSOLUTE path.&amp;nbsp; Make sure that your path starts with the root node, / .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also make sure the path points to a DIRECTORY and not to a FILE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And do not put anything into the SASUSER directory.&amp;nbsp; SAS uses that directory to store your default option settings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try using your home directory (I assume the x'd out the actual account name).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname yrbs "/home/uXXXXXXXX/";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or make a subdirectory and use that.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname yrbs "/home/uXXXXXXXX/yrbs/";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 23:29:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Issue-with-libname/m-p/937840#M11339</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-07-31T23:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with libname</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Issue-with-libname/m-p/937875#M11340</link>
      <description>&lt;P&gt;A Base library (where no specific engine is used) has to point to a&amp;nbsp;&lt;EM&gt;directory&lt;/EM&gt;, not a&amp;nbsp;&lt;EM&gt;file&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;Libraries that point to a file are used with specific engines, like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname myex xlsx "/path/file.xlsx";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I guess you have a SAS program supplied by the website, and misunderstood how you need to adapt it to your environment (SAS On Demand?).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your home directory, create a directory called yrbs2007. Then change the libname:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname yrbs "/home/uXXXXXXXX/yrbs2007";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note the leading slash, making this an absolute path instead of a relative one. You can abbreviate the path to your home directory by using the tilde character, or the HOME environment variable:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname yrbs "$HOME/yrbs2007";
libname yrbs "~/yrbs2007";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Aug 2024 07:01:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Issue-with-libname/m-p/937875#M11340</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-08-01T07:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with libname</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Issue-with-libname/m-p/938873#M11343</link>
      <description>&lt;P&gt;The libname statement pointing to your home directory can be written as:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname YRBS '~';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The data set &lt;CODE class=" language-sas"&gt;YRBS2007&lt;/CODE&gt; is file &lt;CODE class=" language-sas"&gt;yrbs2007.sasb7dat&lt;/CODE&gt; can then be referenced like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=YRBS.YRBS2007; run;&amp;nbsp; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Aug 2024 12:31:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Issue-with-libname/m-p/938873#M11343</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2024-08-10T12:31:13Z</dc:date>
    </item>
  </channel>
</rss>

