Date: Fri, 25 Oct 2002 12:15:38 -0400
Reply-To: Huck <huck@FINN.NOSPAM.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Huck <huck@FINN.NOSPAM.COM>
Organization: Posted via Supernews, http://www.supernews.com
Subject: Re: How to write multiple dest. records from a single source?
Content-Type: text/plain; charset=us-ascii
On 25 Oct 2002 06:50:23 -0700, email@example.com (Will
>I was hoping someone could at least get me started with solving this
>The source data set has 300 columns, which represent 3 measurements on
>100 distinct items. The destination data set should have 3 columns
>(one for each measurement) and 100 times the number of records as the
>source. So, the first record in the destination data set will have 3
>fields: fields number 1, 101 and 201 from the first record of the
>source data set. The second record of the destination data set will
>have fields 2, 102 and 202 from the first record of the source data
>set, and so on.
if the vars are x1-x100 x101-x200 and x201-x300 im in favor of the
data out(drop=x1-x300 _i_ );
array xs(100) x1-x100;
array ys(100) x101-x200;
array zs(100) x201-x300;
do _i_=1 to 100;
>I have looked through the SAS help a little, and thought that I might
>be able to use ARRAYs with TRANSPOSE, but I'm not sure how to output
>multiple records from a single source record. Any suggestions?
the key is the word in CAPS above... OUTPUT, which puts out a record
under programers control.