RDW supports the following values:
For variable length records, the four-byte record descriptor word does not display nor is considered in positional parameters. The first data byte of the record is position 1. N is the default value, but it may have been changed by updating the &BAT_RDW installation option.
For variable length records, the four-byte record descriptor word displays in the output of the PRINT command or is considered in the input positional parameter of any keyword. The first data byte of the input record is position 5 and the RDW is in position 1.
This example copies a variable length record file to a fixed length record file and includes the RDW in the fixed length file. The MOVE keyword moves the RDW starting at position 1 of the input record to data position 1 of the output record.
READ, INFILE(VBFILE), RDW(Y), MOVE(1,0,1), WRITE(FBFILE)
This example identiies any records with a length of 80. (54 is the hex value of the record length (80) + the RDW(4)). Only the record's data are moved to the output buffer, before being written to the ddname LRECL80. Note that the first four bytes of the from-position are not referenced. This is because the RDW value places the RDW in these first four bytes of the from-data.
READ, RDW(Y), IF(1,EQ,X'0054'), MOVE(1,0,5), WRITE(LRECL80)
|
Copyright © 2013 CA.
All rights reserved.
|
|