Date: Tue, 11 Feb 1997 12:32:09 PST
Reply-To: TWB2%Rates%FAR@GO50.COMP.PGE.COM
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: TWB2%Rates%FAR@GO50.COMP.PGE.COM
Subject: Re: trouble grouping variable values
Are there any error or status messages in the log after the FORMAT PROC's?
There should be messages indicating the formats were written. Are there any
error messages after the data step? In particular, is there a format not found
error message? You might want to add a put statement (or two):
DATA MEDS1 (DROP=I J);
SET MEDS;
/* GROUP VALUES FOR PRIMARY DIAGNOSIS */
ARRAY DX{4} $ DX_1-DX_4;
ARRAY MDX{4} MDX_1-MDX_4;
DO I=1 TO 4;
DX(I)=LEFT(DX(I));
MDX(I)=INPUT(PUT(DX(I),$GROUP.),2.);
*debug; put dx(i)=;
END;
/* GROUP VALUES FOR PRIMARY PROCEDURES */
ARRAY PR{6} $ PR_1-PR_6;
ARRAY MPR{6} MPR_1-MPR_6;
DO J=1 TO 6;
MPR(J)=INPUT(PUT(PR(J),$PRC.),2.);
*debug; put pr(j)=;
END;
The syntax PUT PR(J)=; as a PUT statement rather than a PUT function was not
supported until recently (6.08?), but I think it is valid for my site now. You
might also add a RUN; statement at the end of the data step.
Tim Berryhill - Contract Programmer and General Wizard
TWB2@PGE.COM or http://www.aartwolf.com/twb.html
Frequently at Pacific Gas & Electric Co., San Francisco
The correlation coefficient between their views and
my postings is slightly less than 0