| Date: | Thu, 4 Oct 2001 12:50:53 -0700 |
| Reply-To: | "Terjeson, Mark" <TerjeMW@DSHS.WA.GOV> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Terjeson, Mark" <TerjeMW@DSHS.WA.GOV> |
| Subject: | Re: Text File Import Problem |
|
| Content-Type: | text/plain; charset=us-ascii |
Hi Michael,
You will need to make the string variable being used
large enough to handle the largest line or it will get
truncated. The log reports that your longest line found
in the text file is 256. Your string variable in the code
below has only declared it as 50. If you bump up the
size of the string variable being declared I presume
you will load all of the text lines without truncation or
loss of line.
HTH,
Mark
-----Original Message-----
From: Michael Stuart [mailto:muon33@hotmail.com]
Sent: Wednesday, October 03, 2001 12:16 PM
To: TerjeMW@dshs.wa.gov; SAS-L@LISTSERV.UGA.EDU
Subject: RE: Text File Import Problem
Mark (and SAS-L) -- thanks, I'm still having the same problem. I've
adopted some of your coding. First, here's the program:
filename epilist "H:\Vendors\Ffx\MailingTest\EPI-REG-OPEN-100K.TXT" ;
data ffx.epilist (keep = email domain) ;
length email $ 50 ;
infile epilist length=lenvar ;
input @1 email varying. lenvar ;
email = left(trim(lowcase(email))) ;
domain = substr(email,(index(email,'@')+1)) ;
run ;
proc print data=ffx.epilist (obs=10) ;
run ;
THIS GENERATES THE FOLLOWING LOG:
85 data ffx.epilist (keep = email domain) ;
86 length email $ 50 ;
87 infile epilist length=lenvar ;
88 input @1 email varying. lenvar ;
89
90 email = left(trim(lowcase(email))) ;
91
92 domain = substr(email,(index(email,'@')+1)) ;
93
94 run ;
NOTE: The infile EPILIST is:
File Name=H:\Vendors\Ffx\MailingTest\EPI-REG-OPEN-100K.TXT,
RECFM=V,LRECL=256
NOTE: 7771 records were read from the infile EPILIST.
The minimum record length was 43.
The maximum record length was 256.
One or more lines were truncated.
NOTE: The data set FFX.EPILIST has 7771 observations and 2 variables.
NOTE: Compressing data set FFX.EPILIST increased size by 6.19 percent.
Compressed is 103 pages; un-compressed would require 97 pages.
NOTE: DATA statement used:
real time 3.68 seconds
|