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
Diamond | Level 26
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-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

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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