Question about CASUSER library

Accepted Solution Solved
Reply
Senior User
Posts: 1
Accepted Solution

Question about CASUSER library

Hi.

I am new to Viya.

I have one URL to SAS Studio and another for VA and SAS Environment Manager. They both point to the same server and I log on to both with the same credentials.

 

The CASUSER Library that I have in Studio is not the same as the CASUSER Library I have in VA and Environment Manager. The disk portion of the libraries are in different folders. 

I can use Studio to load  a table into CASUSER, but this table will not be available to me in VA. And if I load a table into CASUSER on the SAS Environment Manager, it is not reachable in Studio.  Is that how it is supposed to be? 

 

Regards,

Bjørn


Accepted Solutions
Solution
‎01-30-2018 05:26 AM
SAS Employee
Posts: 525

Re: Question about CASUSER library

Posted in reply to bkv_nextbridge

@bkv_nextbridge,

 

You have to use PROMOTE Statement in CASUTIL procedure. The PROMOTE statement copies a session-scope table to global scope.

 

Documentation: SAS® 9.4 and SAS® Viya® 3.3 Programming Documentation -> CAS User’s Guide -> CASUTIL Procedure -> PR...

 

Example 3: Promote a Table

 

caslib hps datasource=(srctype="path") path="/hps" global;

cas casauto sessopts=(caslib="casuser");

libname mycas cas;

proc casutil;
   load data=sashelp.iris casout="irisraw";
quit;

data mycas.irisout;                                   
   set mycas.irisraw;
   sepalratio = sepalwidth / sepallength;
   petalratio = petalwidth / petallength;
run;

/*
 * The purpose for outcaslib= is to show how to 
 * work with more than one caslib.
 */
proc casutil outcaslib="hps";                         
   promote casdata="irisout";
quit;

proc casutil incaslib="hps";
   contents casdata="irisout";
quit;

View solution in original post


All Replies
Solution
‎01-30-2018 05:26 AM
SAS Employee
Posts: 525

Re: Question about CASUSER library

Posted in reply to bkv_nextbridge

@bkv_nextbridge,

 

You have to use PROMOTE Statement in CASUTIL procedure. The PROMOTE statement copies a session-scope table to global scope.

 

Documentation: SAS® 9.4 and SAS® Viya® 3.3 Programming Documentation -> CAS User’s Guide -> CASUTIL Procedure -> PR...

 

Example 3: Promote a Table

 

caslib hps datasource=(srctype="path") path="/hps" global;

cas casauto sessopts=(caslib="casuser");

libname mycas cas;

proc casutil;
   load data=sashelp.iris casout="irisraw";
quit;

data mycas.irisout;                                   
   set mycas.irisraw;
   sepalratio = sepalwidth / sepallength;
   petalratio = petalwidth / petallength;
run;

/*
 * The purpose for outcaslib= is to show how to 
 * work with more than one caslib.
 */
proc casutil outcaslib="hps";                         
   promote casdata="irisout";
quit;

proc casutil incaslib="hps";
   contents casdata="irisout";
quit;
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 272 views
  • 0 likes
  • 2 in conversation