|
What exactly does "Numeric Informat" mean??
According to the SAS Language Reference: Concepts
http://oz.uc.edu/doc/sasdoc/sashtml/lrcon/z0920449.htm
<http://oz.uc.edu/doc/sasdoc/sashtml/lrcon/z0920449.htm>
there are 5 categories of Informats, the last 2 being:
NUMERIC instructs SAS to read numeric data values into numeric variables.
USER-DEFINED instructs SAS to read data values by using an informat that
is created with an INVALUE statement in PROC FORMAT.
Proc format can create both Numeric and Character informats using the
Invalue statement, which you would think would behave as described in the
table referenced above, that is, a Numeric informat created by Proc Format
should "read numeric data values into numeric variables," right??
So I am creating Numeric informat's, for example:
invalue anem3_
.=.
0-<4.4=2
4.4-<8.9=1
8.9-High=0
;
And then using them with InputN, for example:
data cbc3(drop=leucofmt);
SET cbc2;
<other similar statements>
leucofmt=put(agedays,ageleuco.);
leucocat=inputn(wbc,leucofmt);
format leucocat leucoill.;
run;
And I get the message in my log that "NOTE: Numeric values have been
converted to character values at the places given by: " at WBC the Numeric
value that is the first argument to INPUTN. So SAS doesn't like using the
Numeric source with a Numeric informat to make a new Numeric variable, it
appears to want a Character SOURCE to use with the NUMERIC informat???
Am I missing something here??
Seeking clarification on how informats and formats work,
Kevin Delaney
KDelaney@cdc.gov
|