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 (September 1997, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 3 Sep 1997 14:38:50 PST
Reply-To:     William Viergever <wwvierg@ibm.net>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         William Viergever <wwvierg@IBM.NET>
Subject:      Re: truncated lines
Comments: To: Donny Tang <dtang@INTERSEARCHCORP.COM>

Addressed to: Donny Tang <dtang@INTERSEARCHCORP.COM> SAS-L@UGA.CC.UGA.EDU

** Reply to note from Donny Tang <dtang@INTERSEARCHCORP.COM> Wed, 3 Sep 1997 17:00:37 +0000 > > I am trying to read a comma delimited file into SAS format. > > I already used the command "missover" to read missing observation but > I kept getting message in my log file saying "one or more lines were > truncated". And I found out that when it reads till certain > variables, it stops reading it. > > My SAS PROGRAM was: > > libname mylib 'c:\sas'; > data mylib.one; > infile 'c:\sas\original.txt' delimiter=',' missover; > length variable $ 6 . . . ; > input variable . . .; > run; > > data mylib.two; > set mylib.one (firstobs=2); /* skipping reading the first observation > because it is the field name row*/ > run; > > proc print data=mylib.two label; > label variable=' ' . . ; > run; > > > > Please help! >

Try this e.g.:

input var1 : $6 var2 : $10

where the informat lengths are correct, *BUT* include the colon option (forget what it's called) for each var (it allows for data shorter than expected).

Hope this helps-

================== W.W. Viergever Principal Viergever & Associates Sacramento, CA (916) 923-2355 ==================


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