BookmarkSubscribeRSS Feed
arundhatiD
Fluorite | Level 6

Hi Team,

I am working on SAS studio in SASViya.

I am having one use case where I have one table Audit table in system data Library in sas viya which holds only last 7days data always.
I have created COPY of this data as i am working on ETL to have more data ,so i created copy of this table and promoted it.
But two day before the table disappeared. I used below code .This should not desired in my case as this will be a one time run code and later i will append new rows in the same promoted table.
I have recently started working on SASViya. Please guide me to solve this issue.
 

options validvarname=ANY;

 

 

 

 

cas casdemo sessopts=(caslib=casuser timeout=1800 locale="en_US");

 

 

 

 

 

 

 

caslib _all_ assign;

 

 

 

 

 

libname pblic cas caslib=PUBLIC_DNFS ;

 

 

 

libname sys cas caslib=SystemData;

 

 

 

/*copy a dataset named AUDIT from sys lib to pblic lib*/

 

Proc sql;

 

 

 

 

 

 

 

 

 

 

 

 

 

Drop table pblic.audit;

 

 

 

 

Quit;

 

 

 

 

 

 

 

 

 

 

 

 

 

proc copy in=sys out=pblic;

 

 

 

 

select AUDIT;

 

 

 

 

 

contents data=pblic.AUDIT ;

 

 

 

 

run;

 

 

 

 

 

 

quit;

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PROC CASUTIL;

 

 

 

 

 

Promote casdata ="AUDIT" incaslib="PUBLIC_DNFS"

 

 

outcaslib ="PUBLIC_DNFS" casout  ="AUDIT";

 

 

 

 

 

 

 

 

 

RUN;

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2 REPLIES 2
sbxkoenk
SAS Super FREQ

Hello,

 

Is this solved already??

 

It could be that the server was rebooted. In that case the memory is purged.

It's a good idea to always save your in-memory tables with a special on-disk format (*.sas7hdat). You can use the same CASLIB.

Then after rebooting the server, you can very, very (!) quickly re-load the tables that were in-memory.

 

See PROC CASUTIL SAVE statement.

https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/casref/n1fujq5fhyeiprn1whq1iva21obo.htm

 

Koen

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 lock in 2025 pricing—just $495!

Register 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
  • 1339 views
  • 0 likes
  • 3 in conversation