Date: Wed, 31 Jan 2001 05:16:24 GMT
Reply-To: Kewei Ming <keweiming@SINA.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Kewei Ming <keweiming@SINA.COM>
Subject: HOW TO DIRECT OUTPUT FILES BASED ON A VARIABLE IN DATASTEP?
Hi,
I am have some trouble using SAS to generate text files for a ongoing
project. The dataset has
the following format:
george 15
george 20
george 30
victor 12
victor 25
victor 32
david 21
david 21
david 35
...
...
...
And this file is very long.
I want to generate different files for different persons. I.e., I want to
generate a file named
'george' that contains the following:
george 15
george 20
george 30
Now I know that there are something like 25000 names in the dataset, also
each person
has about 2000 observations. What is the right way to direct SAS to output
to different output files
dynamicly so that I can get these 25000 files by running SAS datastep just
once? I can't imagine going
through this huge dataset 25000 times, each generating only one small
file...
There must be a way. I tried using call symput but failed to get it to work.
All suggestions are welcome. Thanks. Please reply to fg5028@yahoo.com or
post to this board.
Victor