BookmarkSubscribeRSS Feed
R_Win
Calcite | Level 5
HI i am having 4 libraries yesterday i have created two datasets and i forgot what are the names and in which libraries i have stored them .I have created only two datasets yesterday. This is a FAQ any one help me out
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
If you created the SAS datasets in a permanent library (on disk) and NOT in the WORK library, then you should be able to search on Windows and/or UNIX for operating system files with the file extension "sas7bdat". For example, if, in Windows, this libname statement was issued :

[pre]
libname perm 'c:\temp';
[/pre]

and a SAS dataset called PERM.WOMBAT was created (where PERM is the library reference and WOMBAT is the SAS dataset name), then a search on the C: drive should find the operating system file:[pre]
c:\temp\wombat.sas7bdat[/pre]


So, if you search for *.sas7bdat on your entire drive, you should find files with a creation date of yesterday, assuming that you created permanent SAS datasets yesterday.

However, if you created WORK.WOMBAT as the SAS dataset, then when you ended your SAS (or EG) session, the WORK library was cleaned up and all the temporary datasets would have been deleted. Note that a one level name used when creating a SAS dataset such as the one level name for newclass below:
[pre]
proc sort data=sashelp.class out=newclass;
by age name;
run;
[/pre]

-- has the effect of creating WORK.NEWCLASS as a temporary data set. If this was the case, then you would have to recreate or retrieve the program code that you ran yesterday in order to recreate the datasets.
cynthia
deleted_user
Not applicable
Hi John,
To resolve your query,first of all you get the date of creation for all datasets present all libraries by using the below mentioned syntax.

proc sql ;
create table dsn1 as select libname,memname,crdate from dictionary.tables;
quit;

Then you create a dataset,it should contain only the datasets which are created on yesterday by using a WHERE CLAUSE.

data dsn2;
set dsn1;
newvar=put(crdate,datetime9.);
if newvar='yesterday date'; * (eg:29DEC2008)*
run;

Thanks
Siva.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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