<?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: Construct Libname from Metadata Definition in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Construct-Libname-from-Metadata-Definition/m-p/570169#M160767</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Maybe i am missing something, but can't you just use the libref in the libname-statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname lina meta liburi="SASLibrary?@Libref='lina'";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;OMG! No, you haven't missed anything. I did. How good I've asked before wasting time on a totally wrong approach. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2019 10:22:40 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2019-07-01T10:22:40Z</dc:date>
    <item>
      <title>Construct Libname from Metadata Definition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Construct-Libname-from-Metadata-Definition/m-p/570163#M160763</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Has anyone of you ever come across the need to construct a libname statement from its metadata definition?&lt;/P&gt;
&lt;P&gt;What I've got is the libref. What I want is to query SAS metadata for this libref and fully generate the libname statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know how to query metadata but I'm concerned that what I'm after could become quite involved to end up with something robust and production worthy.&lt;/P&gt;
&lt;P&gt;What I hope someone here can provide: A) the expertise by having done that already so I get a better idea how complicated and involved this is and B) ideally some working code (partial or full solution)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A bit more background&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I'm dealing with a situation where I've got a data driven process and one of the parameters my process gets is the source and target librefs (for Hadoop and CAS).&lt;/P&gt;
&lt;P&gt;I can't pre-assign the libraries (at least not the ones for Hadoop) so I need to somehow generate the libname statements in my code - or if that's possible need to tell SAS to execute the metadata library definition which belongs to the libref I'm getting.&lt;/P&gt;
&lt;P&gt;I'm using authentication domains so there is no need to derive the user and password from metadata should that be an issue.&lt;/P&gt;
&lt;P&gt;The batch user executing the process will have all the metadata access required (but won't be an unrestricted user).&lt;/P&gt;
&lt;P&gt;Environment is: SAS9.4M5 under RHEL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Adding&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12887"&gt;@ErikLund_Jensen&lt;/a&gt; because I believe you've done a lot in this area.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 09:09:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Construct-Libname-from-Metadata-Definition/m-p/570163#M160763</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-07-01T09:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Construct Libname from Metadata Definition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Construct-Libname-from-Metadata-Definition/m-p/570164#M160764</link>
      <description>&lt;P&gt;Maybe i am missing something, but can't you just use the libref in the libname-statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname lina meta liburi="SASLibrary?@Libref='lina'";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Jul 2019 09:15:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Construct-Libname-from-Metadata-Definition/m-p/570164#M160764</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-07-01T09:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Construct Libname from Metadata Definition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Construct-Libname-from-Metadata-Definition/m-p/570169#M160767</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Maybe i am missing something, but can't you just use the libref in the libname-statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname lina meta liburi="SASLibrary?@Libref='lina'";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;OMG! No, you haven't missed anything. I did. How good I've asked before wasting time on a totally wrong approach. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2019 10:22:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Construct-Libname-from-Metadata-Definition/m-p/570169#M160767</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-07-01T10:22:40Z</dc:date>
    </item>
  </channel>
</rss>

