Date: Sat, 24 Oct 2009 15:06:43 -0400
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: array from variatble values
Jason sent me the following off-line, but didn't answer my question of what
he expects the resulting file to look like:
>Arthur,
>
>I generated some very quick sample data in Excel (attached).
>
>I'm processing each assessment in turn...so I would start with Read4, then
>Read 5. I'd like to have an array to feed in macro that looks like this:
>
>Item: i1 i2...i10 for read4
>Item: i1 i2...i8 for read5
>
>I want to use them in an array because I'm then creating a text file that
>I'm feeding into other software...and want to be able to determine the
>items on the fly.
>
>Jason
We now know what the input files look like:
data read4;
test='Reading4';
do student=1 to 2;
do item=1 to 10;
output;
end;
end;
run;
data read5;
test='Reading4';
do student=3 to 4;
do item=1 to 8;
output;
end;
end;
run;
But, from his description of the desired output, doesn't appear to be any
more than:
proc transpose data=read4 out=test prefix=item;
var test;
by student;
run;
Somehow, I think that we're still missing something.
Art
--------
On Sat, 24 Oct 2009 07:19:44 -0400, Jason Schoeneberger
<jschoeneberger@CAROLINA.RR.COM> wrote:
>I have normalized assessment data, with items nested within students. I
>would like to define an array based on the item numbers in the variable
ITEM
>in my data file. Current values are i1, i2...ik. Is there a way to create
>an array reference based on the unique values in my ITEM field? Note, i'm
>searching for a solution flexible enough that can handle the identification
>of different arrays across different assessments. In other words, the first
>assessment may have items i1 - i20, the second assessment may have items i1
>- i30.
>
>Thanks,
>
>J