BookmarkSubscribeRSS Feed
SASPhile
Quartz | Level 8
how do to download all the datasets from server which have _sk in their dataset names to a library on my local machine.
for instance:
dataset RTLWP_FF00016I_sk needs to be downloaded to wfr library.
I have around 20 datasets which have _sk

There is a chance to miss out some of the datasets if i have to type them in as i did below.
proc download data=RTLWP_FF00016I_sk out=wfr.RTLWP_FF00016I_sk; run;
2 REPLIES 2
darrylovia
Quartz | Level 8
i would set up a libname statement to connect the DB. then use the SAS DICTIONARY tables to get a listing of the tables in the DB. After that you'll have a table with the contents of the database.

for example:
proc sql;
create table db_contents as
select *
from DICTIONARY.TABLES
where libname='SASHELP';
quit;
darrylovia
Quartz | Level 8
For an example with ORACLE. I tried this and it works.


libname ora ORACLE user=&user password=&pw path=&path schema=&schema;

proc sql;
create table ora_contents as
select *
from DICTIONARY.TABLES
where libname='ORA';
quit;

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
  • 884 views
  • 0 likes
  • 2 in conversation