LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (October 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 26 Oct 2006 13:47:20 +0000
Reply-To:   toby dunn <tobydunn@HOTMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   toby dunn <tobydunn@HOTMAIL.COM>
Subject:   Re: Saving proc contents for more datasets in one file
Comments:   To: lieuwe.de.haan@GMAIL.COM
In-Reply-To:   <1161848491.853688.211650@b28g2000cwb.googlegroups.com>
Content-Type:   text/plain; format=flowed

BitByte ,

This is one of those situations where I would scrap the proc contents and append and go directly to the table which proc contents uses to generate its output.

Proc SQL ; Select Quote( UpCase( FileName ) ) Into : FNames Separated by ' ' From Data.Files ;

Create Table AllMyContents AS Select * From Dictionary.Columns Where Libname = 'WORK' And MemName in ( &Fnames ) ; Quit ;

Toby Dunn

The obscure we see eventually. The completely obvious, it seems, takes longer. ~Edward R. Murrow

Think like a man of action, act like a man of thought. ~Henri Louis Bergson

Alice came to a fork in the road. "Which road do I take?" she asked. "Where do you want to go?" responded the Cheshire cat. "I don't know," Alice answered. "Then," said the cat, "it doesn't matter." ~Lewis Carroll, Alice in Wonderland

From: BitByte <lieuwe.de.haan@GMAIL.COM> Reply-To: BitByte <lieuwe.de.haan@GMAIL.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Saving proc contents for more datasets in one file Date: Thu, 26 Oct 2006 00:41:31 -0700

Thanks for the help (Jim and Richard).

With your help I was able to solve my problem. Following did the trick:

data data.files; length bestand $9; input bestand;

datalines; datafile1 datafile2 datafile3 ; run;

DATA _NULL_; SET data.files; CALL EXECUTE ('PROC Contents DATA=data.' || COMPRESS(Bestand) || ' out=data.' || COMPRESS(Bestand) ||'_pc;RUN;'); RUN;

DATA _NULL_; SET data.files; CALL EXECUTE ('PROC Append DATA=data.' || COMPRESS(Bestand) ||'_pc out=data.totaalovz;RUN;'); RUN;

And again... many thank you's for helping me out!

Greetings,

Lieuwe

BitByte wrote: > Dear all, > > I have a wish but have no idea how to work things out. I have the > folowing > > data data.files; > length file $8; > input file; > > datalines; > file1 > file2 > file3; > run; > > data data.files (drop=total); > set data.files; > total + 1; > call symputx('last',total); > run; > > Now the problem starts.... > > How do I create a do loop that creates a proc contents and appends this > output for all of these datasets in one file... > > I hope someone has brighter ideas than me at this point > > > Greetings Lieuwe

_________________________________________________________________ Get today's hot entertainment gossip http://movies.msn.com/movies/hotgossip?icid=T002MSN03A07001


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