Date: Fri, 23 Dec 2011 21:25:20 +0000
Reply-To: "Fehd, Ronald J. (CDC/OCOO/ITSO)" <rjf2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J. (CDC/OCOO/ITSO)" <rjf2@CDC.GOV>
Subject: Re: reading csv files by taking varible names,
type and length from another dataset
In-Reply-To: <CADb28=m6bv2NQtqb-BJ-HEQb0rSksRD=yfsyKD=jYtoeqOxtWw@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"
Hi Pradeep:
In my vocabulary your problem is known as list processing:
use one data set to generate statements for later use of other data
This page has several ideas that you can use.
List Processing Basics Creating and Using Lists of Macro Variables
Tiny Url: http://tinyurl.com/5p3j2z for this page
http://www.sascommunity.org/wiki/List_Processing_Basics_Creating_and_Using_Lists_of_Macro_Variables
filename Statemnt 'read-3-csv-files.sas';
DATA _Null_;
file StateMnt;
do until(EndoFile);
set Library.Name_Type_Length end = EndoFile;
put Name= Type= length=;
end;
stop;
run;
%include StateMnt;
Ron Fehd who can get you a 100+ copies of your code submitted RealQuick
just give me the List==Control Data Set
> -----Original Message-----
> From: Pradeep [mailto:chittiprolupradeep@gmail.com]
> Sent: Friday, December 23, 2011 3:18 PM
> To: Fehd, Ronald J. (CDC/OCOO/ITSO)
> Subject: Re: reading csv files by taking varible names, type and length from
> another dataset
>
> Hi Ronald,
>
> Thanks for the quick turn up.
>
> Here i have 3 CSV files where all these three csv files have same variable
> names, type and lengths. I already written a code to import all those 3 CSV
> files into SAS.
>
> Now i got the requirement is i have those csv variable names , type, length
> in an seperate dataset. So, when i read the csv files the variable names and
> its type, length should read from the seperate dataset.
>
>
> thanks
|