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!
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
Just a quick note on terminology ... tables versus files ...
BR, Koen
Dive into keynotes, announcements and breakthroughs on demand.
Explore Now →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.
Ready to level-up your skills? Choose your own adventure.