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 (January 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 25 Jan 2002 16:42:16 -0500
Reply-To:     howard_schreier@ITA.DOC.GOV
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         howard_schreier@ITA.DOC.GOV
Subject:      Re: Reading delimited files

Sure, just include the option

dlm='+'

on the INFILE statement and use this INPUT statement:

input Prov 1 - 2 CMA 3 - 5 casl 6 - 6 pca 7 - 9 CTname $ 10 - 16 CT 17 - 20 CMAname $ 21 - 50 blank $ 51 - 52 CFA11-CFA16 ;

But I don't think these fields are delimited. You may have documentation to the contrary, but to me these look like signed values. In other words, if negative values are allowed, I would expect to see the minus signs in place of the plus signs, not following them.

On Fri, 25 Jan 2002 10:06:08 -0500, A.Michelle Edwards <edwardsm@UOGUELPH.CA> wrote:

>Good day all! > >Is it possible to read in a file which is "partially" delimited. Here's a sample line of data: > >00000 000 0000CANADA +0673498000+0588133500+0015174000+0070190500+0085364500+0269057500 > >Here's the input line: > >Prov 1 - 2 >CMA 3 - 5 >casl 6 - 6 >pca 7 - 9 >CTname $ 10 - 16 >CT 17 - 20 >CMAname $ 21 - 50 >blank $ 51 - 52 >CFA11 53 - 63 >CFA12 64 - 74 >CFA13 75 - 85 >CFA14 86 - 96 >CFA15 97 - 107 >CFA16 108 - 118 > >The first + appears in column 53. I have several of these files and was hoping for a quick way to deal with this rather than changing each variable's starting point... > >Any suggestions? > >Thanks, >Michelle > >__________________________________ >A. Michelle Edwards, Ph.D. >Academic Services, CCS >University of Guelph >Guelph, Ontario N1G 2W1 > >Ph: 519-824-4120 ext 4539 (am) 6417 (pm) >FAX: 519-767-1620 >__________________________________ >


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