home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!spool.mu.edu!darwin.sura.net!paladin.american.edu!auvm!ATTMAIL.COM!JADETECH
- Content-Type: text
- Message-ID: <SAS-L%92122112004041@UGA.CC.UGA.EDU>
- Newsgroups: bit.listserv.sas-l
- Date: Mon, 21 Dec 1992 16:46:21 GMT
- Reply-To: jadetech@ATTMAIL.COM
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: jadetech@ATTMAIL.COM
- Subject: Reading Variable Length Binary Files
- Comments: To: SAS-L@uga.cc.uga.edu
- Lines: 25
-
- Thanks to Melvin Klassen and J. Philip Miller for their help. Also thanks
- to Bill Calvert who (unknowingly) gave me the key to solving the problem.
- I happened to look at Bill's paper which will be given at SESUG '93 in
- February, which has an example similar to the problem I posed. Thanks all.
-
- For the record, what follows is an abbreviated version of the code that
- I found works. The problem was reading a binary PC file with variable
- length records and no end of record marker:
-
- DATA PCFILE ;
- INFILE BINARY RECFM=N LRECL=2048 END=EOF ;
- DO UNTIL (EOF) ;
- INPUT len pib1.
- text $varying200. len @ ;
- OUTPUT ;
- END;
- RUN ;
-
- Simple, yet the key was the combination of the RECFM=N and LRECL ;
- Thanks again for the help.
-
- S. David Riba
- JADE Tech, Inc.
-
- JADETECH@ATTMAIL.COM
-