Date: Wed, 20 Nov 1996 18:43:12 GMT
Reply-To: Steve Doliov <doliov@WCO.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Steve Doliov <doliov@WCO.COM>
Organization: West Coast Online, Inc.
Subject: Re: Force read of 508 bytes?
Richard Wherry <email@example.com> wrote:
: these 508 bytes there may be a sequence denoting an end of record to SAS
: (the hexcode for \A\D).
: How do I read the 508 bytes without regard to any end of record
: delimiters that may appear? Basically, I want to FORCE SAS TO READ 508
: BYTES and throw it out (I do not need any of the information in this
: P.S. I'm in an UNIX environment.
quick point, if you are in unix, the end of record mark should be only a
newline, not a CRLF (Carraige return-line feed). but that is besides the
another poster's solution might work in MVS because of blocked records,
but i don't believe that will help in UNIX because all files are byte
perhaps you want to try using a line pointer and somevariable to record
number of bytes read.
so if your 508 byte record spans 5 lines because it has four embedded
newline characters, you might want to try
counting the bytes read from a rectype=18 into a variable. if the amount
is not 508, then read more from the next line, but not more than 508
(again, inlcuding or excluding linefeeds, as your program may require).
if only SAS had true array capabilities......