<?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 SAS VIYA : How do I change which caslib to be active? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-VIYA-How-do-I-change-which-caslib-to-be-active/m-p/607905#M176817</link>
    <description>&lt;P&gt;I am exploring and trying out SAS VIYA.&lt;/P&gt;&lt;P&gt;I am asking about this because I'm testing this code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data casuser.NZstatdtx;
set myCaslib.NZstatdt;
ANZcode=(substr(ANZSIC06,1,3));
code_Desc=(substr(ANZSIC06,9,length(ANZSIC06)-8));
Area_cd=(substr(Area,1,4));
Area_name=(substr(Area,6,length(Area)-5));
drop ANZSIC06 Area;
run;

proc casutil;
	contents casdata="NZstatdt" INCASLIB=myCaslib ;
        contents casdata="NZstatdtx" INCASLIB=casuser ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I got the error below&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;75    
76    
77    data casuser.NZstatdtx;
78    set myCaslib.NZstatdt;
79    ANZcode=(substr(ANZSIC06,1,3));
80    code_Desc=(substr(ANZSIC06,9,length(ANZSIC06)-8));
81    Area_cd=(substr(Area,1,4));
82    Area_name=(substr(Area,6,length(Area)-5));
83    drop ANZSIC06 Area;
84    run;
NOTE: Running DATA step in Cloud Analytic Services.
NOTE: The DATA step will run in multiple threads.
NOTE: There were 36125 observations read from the table NZSTATDT in caslib MYCASLIB.
NOTE: The table NZstatdtx in caslib MYCASLIB has 36125 observations and 7 variables.
NOTE: DATA statement used (Total process time):
      real time           1.81 seconds
      cpu time            0.10 seconds
      
85    
86    proc casutil;
NOTE: The UUID ' ' is connected using session MYSESSION.
87    
87  !  contents casdata="NZstatdt" INCASLIB=myCaslib ;
NOTE: Cloud Analytic Services processed the combined requests in 0.001092 seconds.
88    contents casdata="NZstatdtx" INCASLIB=casuser ;
NOTE: The fileInfo action could not be run for the file "NZstatdtx".
ERROR: The table NZstatdtx could not be located in caslib CASUSER(test) of Cloud Analytic Services.
ERROR: The action stopped due to errors.
NOTE: Cloud Analytic Services processed the combined requests in 0.001008 seconds.
89    run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When I try to do a proc contents for both source table and output table, I still says the output table cannot be located.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc casutil;
	 
        contents casdata="NZstatdtx" INCASLIB=casuser ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is the error I am getting due to the caslib not being active, if so how do you change active caslib in a particular session to prevent such error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2019 23:35:36 GMT</pubDate>
    <dc:creator>johnfrytz</dc:creator>
    <dc:date>2019-11-27T23:35:36Z</dc:date>
    <item>
      <title>SAS VIYA : How do I change which caslib to be active?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-VIYA-How-do-I-change-which-caslib-to-be-active/m-p/607905#M176817</link>
      <description>&lt;P&gt;I am exploring and trying out SAS VIYA.&lt;/P&gt;&lt;P&gt;I am asking about this because I'm testing this code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data casuser.NZstatdtx;
set myCaslib.NZstatdt;
ANZcode=(substr(ANZSIC06,1,3));
code_Desc=(substr(ANZSIC06,9,length(ANZSIC06)-8));
Area_cd=(substr(Area,1,4));
Area_name=(substr(Area,6,length(Area)-5));
drop ANZSIC06 Area;
run;

proc casutil;
	contents casdata="NZstatdt" INCASLIB=myCaslib ;
        contents casdata="NZstatdtx" INCASLIB=casuser ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I got the error below&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;75    
76    
77    data casuser.NZstatdtx;
78    set myCaslib.NZstatdt;
79    ANZcode=(substr(ANZSIC06,1,3));
80    code_Desc=(substr(ANZSIC06,9,length(ANZSIC06)-8));
81    Area_cd=(substr(Area,1,4));
82    Area_name=(substr(Area,6,length(Area)-5));
83    drop ANZSIC06 Area;
84    run;
NOTE: Running DATA step in Cloud Analytic Services.
NOTE: The DATA step will run in multiple threads.
NOTE: There were 36125 observations read from the table NZSTATDT in caslib MYCASLIB.
NOTE: The table NZstatdtx in caslib MYCASLIB has 36125 observations and 7 variables.
NOTE: DATA statement used (Total process time):
      real time           1.81 seconds
      cpu time            0.10 seconds
      
85    
86    proc casutil;
NOTE: The UUID ' ' is connected using session MYSESSION.
87    
87  !  contents casdata="NZstatdt" INCASLIB=myCaslib ;
NOTE: Cloud Analytic Services processed the combined requests in 0.001092 seconds.
88    contents casdata="NZstatdtx" INCASLIB=casuser ;
NOTE: The fileInfo action could not be run for the file "NZstatdtx".
ERROR: The table NZstatdtx could not be located in caslib CASUSER(test) of Cloud Analytic Services.
ERROR: The action stopped due to errors.
NOTE: Cloud Analytic Services processed the combined requests in 0.001008 seconds.
89    run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When I try to do a proc contents for both source table and output table, I still says the output table cannot be located.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc casutil;
	 
        contents casdata="NZstatdtx" INCASLIB=casuser ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is the error I am getting due to the caslib not being active, if so how do you change active caslib in a particular session to prevent such error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 23:35:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-VIYA-How-do-I-change-which-caslib-to-be-active/m-p/607905#M176817</guid>
      <dc:creator>johnfrytz</dc:creator>
      <dc:date>2019-11-27T23:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS VIYA : How do I change which caslib to be active?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-VIYA-How-do-I-change-which-caslib-to-be-active/m-p/607998#M176873</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I am not wrong, you have to declare the caslib everytime you use it to make it active.&lt;/P&gt;&lt;P&gt;Btw, You may do a proc contents directly without using casutil.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC CONTENTS DATA=myCaslib.Nzstatdtx ; RUN&amp;nbsp;;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 08:21:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-VIYA-How-do-I-change-which-caslib-to-be-active/m-p/607998#M176873</guid>
      <dc:creator>Pmyosh</dc:creator>
      <dc:date>2019-11-28T08:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: SAS VIYA : How do I change which caslib to be active?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-VIYA-How-do-I-change-which-caslib-to-be-active/m-p/608127#M176938</link>
      <description>&lt;P&gt;Cheers&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/300856"&gt;@Pmyosh&lt;/a&gt;&amp;nbsp;. Thanks for the response.&lt;/P&gt;&lt;P&gt;You are correct, I've just tried declaring&amp;nbsp; the caslib again.&lt;/P&gt;&lt;P&gt;Encountered no error in that portion.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;cas mySession sessopts=(caslib="myCaslib");
caslib casuser list;
caslib myCaslib list;

Log:
95    cas mySession sessopts=(caslib="myCaslib");
NOTE: 'MYCASLIB' is now the active caslib.
NOTE: The CAS statement request to update one or more session options for session MYSESSION completed.
96    caslib casuser list;
NOTE: Session = MYSESSION Name = CASUSER(test)
         Type = PATH
         Description = Personal File System Caslib
         Path = /opt/sas/viya/config/data/cas/default/casuserlibraries/test/
         Definition = 
         Subdirs = Yes
         Local = No
         Active = No
         Personal = Yes
NOTE: Action to LIST caslib CASUSER completed for session MYSESSION.
97    caslib myCaslib list;
NOTE: Session = MYSESSION Name = MYCASLIB
         Type = PATH
         Description = 
         Path = /Users/test/workshop/
         Definition = 
         Subdirs = Yes
         Local = Yes
         Active = Yes
         Personal = No
NOTE: Action to LIST caslib MYCASLIB completed for session MYSESSION.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess , I need further understanding on proper usage of CASUTIL especially working with different caslib.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 20:39:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-VIYA-How-do-I-change-which-caslib-to-be-active/m-p/608127#M176938</guid>
      <dc:creator>johnfrytz</dc:creator>
      <dc:date>2019-11-28T20:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAS VIYA : How do I change which caslib to be active?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-VIYA-How-do-I-change-which-caslib-to-be-active/m-p/608153#M176948</link>
      <description>&lt;P&gt;That's good! Yes, I think the casutil is still unexplored by lots of users like us.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2019 02:08:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-VIYA-How-do-I-change-which-caslib-to-be-active/m-p/608153#M176948</guid>
      <dc:creator>Pmyosh</dc:creator>
      <dc:date>2019-11-29T02:08:20Z</dc:date>
    </item>
  </channel>
</rss>

