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 (November 1996, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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 <r-wherry@nwu.edu> 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 : record).

: 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 point.

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 streams.

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......

good luck, steve doliov


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