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 (February 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 5 Feb 2004 15:35:47 -0500
Reply-To:     "Michael S. Zdeb" <msz03@HEALTH.STATE.NY.US>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Michael S. Zdeb" <msz03@HEALTH.STATE.NY.US>
Subject:      Re: dropping spaces in the data
Comments: To: Mayukh Dass <dass@UGA.EDU>
Content-type: text/plain; charset=us-ascii

I just tried a couple examples with numbers having embedded spaces. I don't think that EXCEL really recognizes a string of numerals with an embedded space as a number --- they are text, yes/no?

You can avoid trying to figure out how to make import work (as I did) .Export the data to a CSV file and use a COMMA informat to read the data. Or, if you are using windows, use DDE, list input, and a COMMA informat. The COMMA informat in either case will 'squeeze' the space out of the number..

data test; infile datalines dsd; input (w x y z) (: comma8.); put w= / x= / y= / z=; datalines; 100 000,2 000,3 00,4 0, ; run;

LOG... 98 data test; 99 infile datalines dsd; 100 input (w x y z) (: comma8.); 101 put w= / x= / y= / z=; 102 datalines;

w=100000 x=2000 y=300 z=40

Mike Zdeb U@Albany School of Public Health 1 University Drive Rensselaer, NY 12144-3456 (P)518-402-6479 (F)630-604-1475

|---------+----------------------------> | | Mayukh Dass | | | <dass@UGA.EDU> | | | Sent by: "SAS(r) | | | Discussion" | | | <SAS-L@LISTSERV.U| | | GA.EDU> | | | | | | | | | 02/05/2004 03:05 | | | PM | | | Please respond to| | | Mayukh Dass | | | | |---------+----------------------------> >----------------------------------------------------------------------------------------------------------------------| | | | To: SAS-L@LISTSERV.UGA.EDU | | cc: | | Subject: dropping spaces in the data | >----------------------------------------------------------------------------------------------------------------------|

Hi,

I have an excel sheet of numbers. The problem is these no.s has spaces between them to represent hundreds, thousand and so on. (eg. 100000 is represented as 100 000) I imported the file in SAS, but whenever I am trying to analyse these nos, I am failing to do so.

For eg. if am trying to divide the no. 100 000 by 100, it is returning a missing value.

Is there anyway I can read the no. in SAS without the spaces in between.

Thanks, Mayukh


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