LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (March 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 8 Mar 2004 09:02:09 -0600
Reply-To:   sreevatsan <sreevat.s@GLOBALCASE.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   sreevatsan <sreevat.s@GLOBALCASE.NET>
Subject:   Format Problem
Comments:   To: "Chang Y. Chung" <chang_y_chung@HOTMAIL.COM>
Comments:   cc: nsridhar@ATHEROGENICS.COM
In-Reply-To:   <200403052254.i25Msod29901@listserv.cc.uga.edu>
Content-Type:   text/plain; charset="iso-8859-1"

Proc Format; INVALUE $RACE 'W','B','I','H' = _SAME_ OTHER = 'Invalid'; INVALUE $GENDER 'F','M' = _SAME_ OTHER = 'Invalid';

run;

DATA EXAMPLE; INPUT @1 GENDER $GENDER. @4 RACE $RACE.;

DATALINES; M H F A A A B B ; proc print data = example; run;

Dear guys,

The output for this code is

Obs GENDER RACE 1 Invalid H 2 Invalid Invalid 3 Invalid Invalid 4 Invalid B

When i change the code in Proc format to from GENDER OTHER to Inv it works correctly.

Proc Format; INVALUE $RACE 'W','B','I','H' = _SAME_ OTHER = 'Invalid'; INVALUE $GENDER 'F','M' = _SAME_ OTHER = 'Inv';

run; then it works perfectly well

Proc Format; INVALUE $RACE 'W','B','I','H' = _SAME_ OTHER = 'Invalid'; INVALUE $GENDER 'F','M' = _SAME_ OTHER = 'Inv';

run;

Obs GENDER RACE 1 M H 2 F Invalid 3 Inv Invalid 4 Inv B

Can anyone help to understand this problem.

Regards, Sreevatsan


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