Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sas temp library doesn't need libref while others do ?

Tags:

sas

i am working on SAS enterprise guide 7.12 sas base 9.4 running this code :

data work.new; 
  input fname $ ; 
  datelines; 
  john 
  ;
run;     
data temp.x ;
    set work.new;
run; 

code running without errors there is no errors although i didn't submit libref for temp library also if i change the temp library name to any name an error rise to libref the new lib , what is going on ?

like image 462
Abdelrahman Maharek Avatar asked Jan 19 '26 06:01

Abdelrahman Maharek


1 Answers

SAS provide a number of libraries automatically at the start of your session, the locations of which can be seen by running the code below:

data _null_;
  work=pathname('work');
  temp=pathname('temp');
  sasuser=pathname('sasuser');
  put (_all_)(/=);
run;

The WORK library is always emptied when your session ends, however the TEMP and SASUSER libraries can retain data after your session is ended (albeit that files in TEMP may get periodically cleared, depending on your local configuration). So you can store personal items there, but be warned - you may get an angry administrator after you if you store too much :-)

Also it won't be accessible to anyone else but you.

Further info on system libraries here, but it does seem that documentation on the TEMP library is scarce at best.

like image 83
Allan Bowe Avatar answered Jan 23 '26 11:01

Allan Bowe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!