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 (April 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 27 Apr 2007 20:03:09 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: Data type convertion failure
Comments: To: irinfigvam@YAHOO.COM
In-Reply-To:  <20070427195147.3426.qmail@web51612.mail.re2.yahoo.com>
Content-Type: text/plain; format=flowed

Data BC65DEN2_DS100 ; Set BC65NUM2 ; Where InPut( MHFACEDS , 8. ) Not In ( . 0 ) ; Run ;

Or If you insist on needing the conversion:

Data BC65DEN2_DS100 ( Drop = __MHFACEDS ) ; Set BC65NUM2 ( Rename = ( MHFACEDS = __MHFACEDS ) ) ;

MHFACEDS = InPut( __MHFACEDS , 8. ) ;

If MHFACEDS Not In ( . 0 ) ;

Run ;

Toby Dunn

You can see a lot by just looking. ~Yogi Berra

Do not seek to follow in the footsteps of the wise. Seek what they sought. ~Matsuo Basho

You never know what is enough, until you know what is more than enough. ~William Blake, Proverbs of Hell

From: Irin later <irinfigvam@YAHOO.COM> Reply-To: Irin later <irinfigvam@YAHOO.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: Data type convertion failure Date: Fri, 27 Apr 2007 12:51:47 -0700

After I ran the following code where I converted MHFACEDS to numeric I still have field MHFACEDS character

91 data BC65DEN2_DS100; 92 set bc65num2; 93 MHFACEDS=input(MHFACEDS,3.); 94 if MHFACEDS ne . and MHFACEDS ne 0; 95 RUN; NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column). 93:10 NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column). 94:5 94:23 NOTE: There were 70 observations read from the data set WORK.BC65NUM2. NOTE: The data set WORK.BC65DEN2_DS100 has 55 observations and 143 variables.

Proc Contents said:

# Variable Type Len Pos Format Informat Label

ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ 37 MHFACEDS Char 3 1350 $3. $3. MHFACEDS 35 MHFACENM Char 2 1298 $2. $2. MHFACENM

I wonder why MHFACEDS is still a character data type?

Thank you in advance,

Irin

--------------------------------- Ahhh...imagining that irresistible "new car" smell? Check outnew cars at Yahoo! Autos.

_________________________________________________________________ Get a FREE Web site, company branded e-mail and more from Microsoft Office Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/


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