Date: Tue, 23 Oct 2001 21:11:49 +0100
Reply-To: Peter Crawford <Peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Peter Crawford <Peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Organization: Crawford Software Consultancy Limited
Subject: Re: VARIABLE LENGTH RECORD
Content-Type: text/plain;charset=iso-8859-1
Crystal Vierhout <vierhout@unity.ncsu.edu> writes
> Hello,
>
> I really need a quick answer from an expert. I have a variable
> length binary file. I am unable to read in the second record or
> the file. My maximum record length is 5850. My minimum record
> length is 3271. Does anyone see what I am doing wrong? I've tried
> it without the blksize and get the same result. HELP!!
>
>
> FILENAME FILE1 'C:\PROGRAMS\ACCOUNT\DICKFILE.TXT' ;
>
> DATA HERDS;
>
> INFILE FILE1 RECFM=V LRECL=5850 BLKSIZE=5850;
>
> INPUT @1 HERDCODE S370FPD7.;
>
> run;
>
> Crystal Vierhout
> Dairy Records Management Systems
Hi Crystal
I think you should read the technical document at
http://ftp.sas.com/techsup/download/technote/ts642.html
TS-642
Reading EBCDIC Files on ASCII Systems
This talks about the challenges you'll face trying to read that binary
download .....
It suggests you may be able to fix your problem with infile options
recfm=s370vb lrecl=5858;
(having a value larger than your data may be necessary to support block
and/or record definition words ... and the 8 bytes here make little
difference to memory usage)
good luck
--
Peter Crawford