BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
bkv_nextbridge
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
alexal
SAS Employee

@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

1 REPLY 1
alexal
SAS Employee

@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;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

Discussion stats
  • 1 reply
  • 4099 views
  • 1 like
  • 2 in conversation