Date: Tue, 27 Nov 2001 15:28:06 +0100
Reply-To: "Edel, Christoph (Frankfurt)" <CEdel@DE.IMSHEALTH.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Edel, Christoph (Frankfurt)" <CEdel@DE.IMSHEALTH.COM>
Subject: Re: Very nice situation !!!
Content-Type: text/plain; charset="ISO-8859-1"
Here is another variation using CALL EXECUTE:
%* *** create the test data;
%* *** some datasets to be SET;
data ddd00001 dse00005 fgt54669 wse25003;
a = 1;
run;
%* *** the data set containing the dataset NAMES;
data Data_1;
infile cards;
input mem_1 $;
cards;
ddd00001
dse00005
fgt54669
wse25003
;
run;
%* *** use CALL EXECUTE as code generator;
data _null_;
set data_1 end = eof;
if _N_ eq 1 then
call execute ( "data final; set" );
call execute ( mem_1 );
if eof then
call execute( "; run;" );
run;
I like Venky's SQL approach and it was the first thing that came to my mind
when I read the original query. The approach is somewhat limited in that it
needs to be known beforehand that the list will not exceed the 32K (now is
it 64 in v8.2???) macro variable length limit...
Gruss/Kind regards
Christoph Edel
Produktionssupportspezialist
IMS HEALTH GmbH & Co. OHG
Hahnstrasse 30-32
60528 Frankfurt
Tel.: 0049-69-6604-789
Fax: 0049-69-6604-600
E-Mail: cedel@de.imshealth.com
www.imshealth.de
Die Informationen dieser Mitteilung und ihrer Anlage sind vertraulich und
nur für ihren oben genannten Empfänger bestimmt. Unbefugtes Weiterleiten,
Veröffentlichen, Kopieren usw. sind untersagt. Sollte dieses E-Mail nicht
für Sie bestimmt sein, löschen Sie es bitte umgehend aus Ihrem System und
kontaktieren Sie den Absender.
Euler to Diderot: "Sir, (a+b**n)/n = x, hence God exists; reply!"
> -----Original Message-----
> From: A. L. [SMTP:franz_cl2003@YAHOO.FR]
> Sent: Tuesday, November 27, 2001 2:16 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Very nice situation !!!
>
> Dear all !
>
> The very nice situation I am working on at the moment
> looks like this.
>
> I have data_1 having itself a character variable named
> mem_1 with this structure:
>
> Data_1
>
> mem_1
>
> ddd00001
> dse00005
> fgt54669
> wse25003
> .
> .
> .
>
> What I would like to achieve just looks like this:
>
> DATA final;
> SET dd00001 des00005 ftg54669 wse25003;
> RUN;
>
> I would have done it that very simple way if I had
> only
> those four file names to deal with!
>
> Thank you all for for help.
> Franz.
>
>
>
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> Yahoo! Courrier : http://courrier.yahoo.fr