LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 22 Aug 2002 11:33:33 -0400
Reply-To:   "Delaney, Kevin P." <khd8@CDC.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Delaney, Kevin P." <khd8@CDC.GOV>
Subject:   Numeric Informats??
Content-Type:   text/plain; charset="iso-8859-1"

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


Back to: Top of message | Previous page | Main SAS-L page