BookmarkSubscribeRSS Feed
nickcz
Calcite | Level 5

Hi all, this is a very basic question but it's got me stumped.  I have been using SAS Viya up to now, but I'm trying to dive into SAS programming to extend some capabilities.  I'm trying to reference data in my personal casuser lib, but I can't figure out the file path.  Can someone help me with what the file path would be to reference a file in my casuser lib?

 

Thanks!

2 REPLIES 2
sbxkoenk
SAS Super FREQ

You don’t need the file path at all to read or process a table in a CASLIB.

Moreover, the table is stored in memory (although it can also be dumped as a *.sashdat file in the on-disk portion of your CASLIB).

And also ... not all CASLIBs are path-based. There are also external database-oriented CASLIBs (like for Oracle, for Teradata, for DB2, ...).

 

I’ll give you a few ways to find out the paths associated with (path-based) CASLIBs, but I’d be surprised if you ever needed those paths in a SAS-program.

 

Perhaps you could go into a bit more detail about what you’re trying to achieve ... then you won’t take any unnecessary detours.

 

/* SEE INFO in LOG-screen and SEE INFO in RESULTS-screen */
cas mySession sessopts=(caslib=casuser timeout=1800 locale="en_US");
caslib _all_ assign;
caslib _all_ list;
libname mycas cas sessref=mySession;

proc casutil incaslib=casuser; 
 list files;
*list tables; 
quit;
/* end of program */

BR, Koen

sbxkoenk
SAS Super FREQ

Just a quick note on terminology ... tables versus files ...

  • When you refer to a table in a CASLIB, that table (with data structured in rows and columns) is in-memory.
  • When you refer to a file, this could be a *.pdf file, a *.docx file or a *.sashdat file (such a .sashdat file also contains your table data, but is saved to disk with the intention of converting it back into an in-memory table at a later stage).

BR, Koen

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore Now →
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 376 views
  • 0 likes
  • 2 in conversation