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>
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
|