Accessing Tape Devices - IBM - RPG

Use the SEQ device specifications whenever you write to a tape file. To write variable-length records to a tape file, use the RCDBLKFMT parameter of the CL command CRTTAPF or OVRTAPF. When you use the RCDBLKFMT parameter, the length of each record to be written to tape is determined by:

  • the highest end position specified in the output specifications for the record or,
  • if you do not specify an end position, the compiler calculates the record length from the length of the fields.

Read variable-length records from tape just like you would read records from any sequentially organized file. Ensure the record length specified on the file description specification accommodates the longest record in the file.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

IBM - RPG Topics