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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 593 views
  • 0 likes
  • 3 in conversation