On 06/27/2014 08:58 PM, Ron Thomas wrote: > I needed to know is there any thing we can do for this file so that doesn't > write anything beyond 150 bytes , so that the length of the record read will > be <= 150 > > Thanks > Ron T > > I don't under stand the problem here.
If the goal is never to write a record greater than 150 bytes and to get an error if an attempt to write a longer record is made, the the maximum record length for the VSAM file should be defined as 150 and VSAM will enforce that maximum. If there is some weird reason why you want the VSAM file defined with a larger LRECL limit than required by any record, then the only way to enforce a smaller restriction on actual record length is to build that restriction into your application logic that generates the records. If you want the assembler program to be able to tolerate but ignore record bytes beyond 150 in a KSDS file that supports longer records, make the program support variable length records up to the maximum for the VSAM file and just don't use any bytes read beyond the first 150 in a record. It's been a few years since I've done VSAM I/O in assembler, but there should be some way to specify your maximum buffer size (should correspond to maximum record permitted in the file) and have the GET return to you both the record and the actual size of the record read. -- Joel C. Ewing, Bentonville, AR [email protected] ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
