<?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: Store CASLIB source Path as variable in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Store-CASLIB-source-Path-as-variable/m-p/561844#M403</link>
    <description>&lt;P&gt;A CAS library points to a Viya App server in-memory location so there is no such thing as a physical folder path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have look at how a CAS LIBNAME is defined:&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=casref&amp;amp;docsetTarget=p088ys3kvgve4en12e8ug6jkkjxy.htm&amp;amp;docsetVersion=3.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;https://documentation.sas.com/?docsetId=casref&amp;amp;docsetTarget=p088ys3kvgve4en12e8ug6jkkjxy.htm&amp;amp;docsetVersion=3.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: Ah, but now I see you are referring to the source path of the CASLIB which you can list with the CASLIB statement:&lt;/P&gt;
&lt;P&gt;caslib MyCASLib list;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm thinking it may be possible to redirect this output then read it into macro variables. I don't have Viya to test this though.&lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2019 04:28:51 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2019-05-28T04:28:51Z</dc:date>
    <item>
      <title>Store CASLIB source Path as variable</title>
      <link>https://communities.sas.com/t5/Developers/Store-CASLIB-source-Path-as-variable/m-p/561826#M402</link>
      <description>&lt;P&gt;I would like to retrieve the path of a caslib and store it as a SAS macro variable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been able to use the table.caslibinfo and print the result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc cas;
table.caslibinfo result=sss/caslib="Mycaslib"  ;
describe sss;
print sss; 
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Would I would like to do is somehow parse the result so that I just end up with the path (physical datasource path of the caslib) and store that in a SAS macro variable.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For comparision If this was a SAS library (MYLIB )I would do something like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let my_mvar= %sysfunc(pathname(MYLIB));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Does anybody have any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 02:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Store-CASLIB-source-Path-as-variable/m-p/561826#M402</guid>
      <dc:creator>34reqrwe</dc:creator>
      <dc:date>2019-05-28T02:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Store CASLIB source Path as variable</title>
      <link>https://communities.sas.com/t5/Developers/Store-CASLIB-source-Path-as-variable/m-p/561844#M403</link>
      <description>&lt;P&gt;A CAS library points to a Viya App server in-memory location so there is no such thing as a physical folder path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have look at how a CAS LIBNAME is defined:&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=casref&amp;amp;docsetTarget=p088ys3kvgve4en12e8ug6jkkjxy.htm&amp;amp;docsetVersion=3.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;https://documentation.sas.com/?docsetId=casref&amp;amp;docsetTarget=p088ys3kvgve4en12e8ug6jkkjxy.htm&amp;amp;docsetVersion=3.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: Ah, but now I see you are referring to the source path of the CASLIB which you can list with the CASLIB statement:&lt;/P&gt;
&lt;P&gt;caslib MyCASLib list;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm thinking it may be possible to redirect this output then read it into macro variables. I don't have Viya to test this though.&lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 04:28:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Store-CASLIB-source-Path-as-variable/m-p/561844#M403</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-05-28T04:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Store CASLIB source Path as variable</title>
      <link>https://communities.sas.com/t5/Developers/Store-CASLIB-source-Path-as-variable/m-p/561847#M404</link>
      <description>thanks, yes its confusing coming to Viya from SAS as there are similarities but also differences. I want to do exactly what you describe and redirect the output but haven't been able to work out how .</description>
      <pubDate>Tue, 28 May 2019 04:34:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Store-CASLIB-source-Path-as-variable/m-p/561847#M404</guid>
      <dc:creator>34reqrwe</dc:creator>
      <dc:date>2019-05-28T04:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Store CASLIB source Path as variable</title>
      <link>https://communities.sas.com/t5/Developers/Store-CASLIB-source-Path-as-variable/m-p/562118#M405</link>
      <description>&lt;P&gt;I have found the answer thanks to this link&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sgf/2017/11/28/interacting-with-the-results-of-proc-cas/" target="_self"&gt;https://blogs.sas.com/content/sgf/2017/11/28/interacting-with-the-results-of-proc-cas/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;need to use the saveresult statement to create a SAS dataset from the result . i.e.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  proc cas;
table.caslibinfo result=sss/caslib="MyCaslib"  ;
describe sss;
print sss; 
saveresult sss  dataout=work.xdata;
run;

proc sql;
    select path into:myvar
    from work.xdata;
quit;

%put myvar = &amp;amp;myvar;
  &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 May 2019 21:58:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Store-CASLIB-source-Path-as-variable/m-p/562118#M405</guid>
      <dc:creator>34reqrwe</dc:creator>
      <dc:date>2019-05-28T21:58:46Z</dc:date>
    </item>
  </channel>
</rss>

