<?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: Libname Statement - Library Name length in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580583#M164940</link>
    <description>In this case I'm in SAS Enterprise Guide.&lt;BR /&gt;</description>
    <pubDate>Mon, 12 Aug 2019 15:33:43 GMT</pubDate>
    <dc:creator>buechler66</dc:creator>
    <dc:date>2019-08-12T15:33:43Z</dc:date>
    <item>
      <title>Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580571#M164934</link>
      <description>&lt;P&gt;Hi.&amp;nbsp; I'm reading that SAS Libnames cannot be any longer than 8 characters.&amp;nbsp; This is a horrible limitation for me as I need to assign multiple libnames (ten or more) of which 4 characters are an ID assigned specifically to me (because we are in a shared server environment).&amp;nbsp; So this only leaves me only 4 chars to make my library names unique. I could use some numbering system like:&amp;nbsp; myid_01, myid_02, myid_03, etc..., but this isn't intuitive and seems really ridiculous to me.&amp;nbsp; When browsing my libraries that appear in the data explorer GUI window I really need to be able to clearly know which library belongs to which sas programming project I'm working on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there anything I can do about this?&amp;nbsp; Can I assign a label to a library name so that when it's displayed in the GUI data explorer I can see a more meaningful name that isn't restricted to just 8 characters?&amp;nbsp; Any other suggestions?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 15:05:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580571#M164934</guid>
      <dc:creator>buechler66</dc:creator>
      <dc:date>2019-08-12T15:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580576#M164935</link>
      <description>&lt;P&gt;Eight beith the count.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might ask "management" how they decided that 4 characters were needed to id users. The first 4 characters would represent up to 1,367,631 users. Perhaps 2 (which would ID 999 users) or 3 (6,963 users) would help ease your problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest NOT using a _ as the separator because it contains no information and would not help by using 25% of your useable space to contain information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 15:19:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580576#M164935</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-12T15:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580577#M164936</link>
      <description>&lt;P&gt;Note sure how being on a shared server has any impact on the librefs you choose to use in your code.&amp;nbsp; Two separate processes can use the same libref to point to different places (WORK is an obvious example), or use two different librefs to point to the same location.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 15:20:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580577#M164936</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-12T15:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580579#M164937</link>
      <description>Understood, but I will not be able to change the policy of a 4 char&lt;BR /&gt;username as this is our client's policy.&lt;BR /&gt;&lt;BR /&gt;So, I'm am I hearing their is no way to assign a label to the LIBNAME? It&lt;BR /&gt;just seems so 'stone age' to have an 8 char limitation in a visual GUI&lt;BR /&gt;environment.&lt;BR /&gt;&lt;BR /&gt;Very frustrating. Even variable names allow for 32 chars, right?  Grrr...&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Aug 2019 15:27:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580579#M164937</guid>
      <dc:creator>buechler66</dc:creator>
      <dc:date>2019-08-12T15:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580581#M164938</link>
      <description>&lt;P&gt;Which GUI are you using?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31677i11016BB45FCAF3B0/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 15:31:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580581#M164938</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-12T15:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580582#M164939</link>
      <description>Good point. Yet still, 8 chars leaves me no room for a meaningful library&lt;BR /&gt;description.  At best I could make up acronyms, but even that will end up&lt;BR /&gt;being confusing in the long run. Ho hum...&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Aug 2019 15:31:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580582#M164939</guid>
      <dc:creator>buechler66</dc:creator>
      <dc:date>2019-08-12T15:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580583#M164940</link>
      <description>In this case I'm in SAS Enterprise Guide.&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Aug 2019 15:33:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580583#M164940</guid>
      <dc:creator>buechler66</dc:creator>
      <dc:date>2019-08-12T15:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580618#M164947</link>
      <description>&lt;P&gt;I have a solution for you but you'll need to type the long names in your code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let my_first_library = XXXX1111;
%let my_next_library = XXXX1112;
%let my_third_library = XXXX1113;
libname &amp;amp;my_first_library "...path1...";
libname &amp;amp;my_next_library "...path2...";
libname &amp;amp;my_third_library "...path3...";

data &amp;amp;my_third_library..new_data;
&amp;nbsp; set &amp;amp;my_first_library..old_data;
&amp;nbsp; .....
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Aug 2019 18:03:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580618#M164947</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2019-08-12T18:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580628#M164951</link>
      <description>&lt;P&gt;You don't need to do that. Since each user's SAS session only sees "their" library assignments, coding the user name into libnames is not necessary. If you need to temporarily access another user's libraries, a simple one-letter prefix would do to separate them from yours.&lt;/P&gt;
&lt;P&gt;And you won't access 10000 libraries of 10000 users in a single session.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 18:23:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580628#M164951</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-12T18:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580658#M164959</link>
      <description>&lt;P&gt;Probably stating the obvious but that is one of the dumbest client policies I've ever hear of. If these SAS libraries are shared between users then having every user define them differently is even dumber.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 20:31:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/580658#M164959</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-08-12T20:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/581288#M165202</link>
      <description>&lt;P&gt;I played a little with Enterprise Guide 7.15 and in the Open window for opening a dataset you can get a list of the LIBNAMES open in your server.&amp;nbsp; It does have a detailed view.&amp;nbsp; For some reason it does not show the path, but it does show a description and location fields. Not clear to me how one goes about putting information into either of those fields.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31756iC852066343E630C3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 20:59:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/581288#M165202</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-08-14T20:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/581297#M165203</link>
      <description>&lt;P&gt;I guess the description is taken from SAS metadata.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 22:16:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/581297#M165203</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-14T22:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/581322#M165211</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/79805"&gt;@buechler66&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The limitation of 8 characters is for the libref. If you define the libraries in SAS Metadata then SAS EG or SAS Studio will show you the metadata name ("the label") and not the libref. The metadata name can be longer than 8 characters.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 161px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31764i0D4724D1F0961699/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not done in above picture but something I consider good practice: Also add the libref to the SAS Metadata name. To directly see the libref makes a coders live easier. I.e. for the first library that could look like:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;00_Control (ctrl00)&amp;nbsp; ....&lt;/EM&gt;with ctrl00 being the libref.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 00:38:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/581322#M165211</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-08-15T00:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/581705#M165360</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;Thanks so much.&amp;nbsp; So how do I&amp;nbsp;&lt;SPAN&gt;define the libraries in SAS Metadata?&amp;nbsp; Is this done as part of defining the libname statement or some other way?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For example:&amp;nbsp; I have this libname statement currently:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname LGTEBA "/sasdata/users/blxn/LabGeneTestExcessBillAn/Datasets";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;As such I see "LGTEBA" in SAS EG's data explorer GUI:&amp;nbsp; I'd much rather see it appear in SAS EG's data explorer GUI as&amp;nbsp; "LGTEBA&lt;CODE class=" language-sas"&gt;_LabGeneTestExcessBillAn_ds".&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;CODE class=" language-sas"&gt;I've tried this, but it's obviously not working as I don't understand how to define something in the metadata. I guess I need help with the syntax.&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname blxn "/sasdata/users/&amp;amp;sysuserid./LabGeneTestExcessBillAn/Datasets";
libname blxn meta library="LabGeneTestExcessBillAn_Ds" metaout=data;&lt;BR /&gt;&lt;BR /&gt;142 libname &amp;amp;sysuserid._lib meta library="LabGeneTestExcessBillAn_Ds" metaout=data;&lt;BR /&gt;ERROR: No metadata objects found matching the specified URI.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 13:22:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/581705#M165360</guid>
      <dc:creator>buechler66</dc:creator>
      <dc:date>2019-08-16T13:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/581709#M165363</link>
      <description>Agreed. Thank you for the clarification.  However the real core of my question is whether there's a way to see a longer Libname label that is longer than 8 chars.</description>
      <pubDate>Fri, 16 Aug 2019 13:07:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/581709#M165363</guid>
      <dc:creator>buechler66</dc:creator>
      <dc:date>2019-08-16T13:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Libname Statement - Library Name length</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/581877#M165426</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/79805"&gt;@buechler66&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need SAS Management Console (SMC) to define libraries in SAS Metadata. Such definitions are permanent and static. They make sense for library definitions which are used in many programs and/or many users.&lt;/P&gt;
&lt;P&gt;Which user can see/use which library defined in metadata is managed via metadata security.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;More detail here. It's for SAS9.2 but the content is still valid:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/onlinedoc/guide/EG43MetaLibraries.pdf" target="_blank"&gt;https://support.sas.com/documentation/onlinedoc/guide/EG43MetaLibraries.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A library in metadata can be pre-assigned. What this means: The definition gets executed during SAS invocation and the libref can then get used in code without any further code. If the library is not pre-assigned then it still shows up in the EG explorer but needs first assignment either manually (right click on the node in the EG explorer and choose "assign") or programmatically (libname statement using the Meta engine).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 22:41:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Libname-Statement-Library-Name-length/m-p/581877#M165426</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-08-16T22:41:58Z</dc:date>
    </item>
  </channel>
</rss>

