LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 28 Apr 2004 13:21:04 -0400
Reply-To:   Tracy Haidar <thaida1@UMBC.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Tracy Haidar <thaida1@UMBC.EDU>
Subject:   PROC CONTENTS or DATASETS--Easy question

How do I use proc contents or datasets to read in the contents of a directory and

(1) Create a printout with ONLY the data set name, #obs, #variables, and format associated with each variable (2) Create a dataset with ONLY the info in (1) above?

I've been experimenting with various options with both proc contents and proc datasets, but I'm getting too little or too much info rather than JUST the info in (1) above. This can't be too hard! Can someone advise me on the propoer options to use with either of these PROCs to get the info I need?

For example, I am reading in the contents of an Access database. When I use the following:

libname rdata odbc dsn= rdata_1;

proc contents directory data= rdata._all_ out=temp ; run;

I get WAY more info in both the output and the data set than I need. Also, in the data set #obs is missing (not sure why) and #variables isn't included (instead each variable is listed).

Adding other options to this so far hasn't given me what I'm looking for...

Thanks,

Tracy


Back to: Top of message | Previous page | Main SAS-L page