Sign in

docs RPG Reference

Rules for File Conditioning

Rules for File Conditioning

When you condition files, remember the following:

  • A file conditioning entry can be made for input, output, update, or combined files.
  • A file conditioning entry cannot be made for table or array input.
  • Output files for tables can be conditioned by U1 through U8. If the indicator is off, the table is not written.
  • A record address file can be conditioned by U1 through U8, but the file processed by the record address file cannot be conditioned by U1 through U8.
  • If the indicator conditioning a primary file with matching records is off, the MR indicator is not set on.
  • Input does not occur for an input, an update, or a combined file if the indicator conditioning the file is off. Any indicators defined on the associated Input specifications in positions 63-74 will be processed as usual using the existing values in the input fields.
  • Data transfer to the file does not occur for an output, an update, or a combined file if the indicator conditioning the file is off. Any conditioning indicators, numeric editing, or blank after that are defined on the output specifications for these files will be processed as usual.
  • If the indicator conditioning an input, an update, or a combined file is off, the file is considered to be at end of file. All defined resulting indicators are set off at the beginning of each specified I/O operation. The end-of-file indicator is set on for READ, READC, READE, READPE, and READP operations. CHAIN, EXFMT, SETGT, SETLL, and UNLOCK operations are ignored and all defined resulting indicators remain set off.