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 (May 2001, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 3 May 2001 10:18:43 -0400
Reply-To:     Muhammad Akhtar <MAkhtar@DMAS.STATE.VA.US>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Muhammad Akhtar <MAkhtar@DMAS.STATE.VA.US>
Comments: To: MagnusW@IUI.SE
Content-Type: text/plain; charset=US-ASCII

Magnus: following coding should do it.

PROC FORMAT ; INVALUE CCOUNTRY 'UK'=123 'US'=124; RUN; DATA DATA1; INPUT COUNTRY $; CARDS ; UK US ; RUN; DATA DATA2; SET DATA1; NCOUNTRY=INPUT(COUNTRY,CCOUNTRY.); RUN; PROC PRINT; RUN;

Muhammad Akhtar

>>> Magnus Wiberg <MagnusW@IUI.SE> 05/03/01 08:55AM >>> What format should I use if I want to assign country codes ('US 'UK' and so on) three digits numeric values and the convert from text variable to a numeric variable? I.e., I have country codes ('US' 'UK') and so on) that I want to assign numeric values to and then convert to a numeric variable. Magnus


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