RPG/400 Help

Positions 32-37 (EXCPT Name)

When the record type is an exception record (indicated by an E in position 15), a name can be placed in these positions of the record line. The EXCPT operation can specify the name assigned to a group of the records to be output. This name is called an EXCPT name. An EXCPT name must follow the rules for using symbolic names. A group of any number of output records can use the same EXCPT name, and the records do not have to be consecutive records.

When the EXCPT operation is specified without an EXCPT name, only those exception records without an EXCPT name are checked and written if the conditioning indicators are satisfied.

When the EXCPT operation specifies an EXCPT name, only the exception records with that name are checked and written if the conditioning indicators are satisfied.

The EXCPT name is specified on the main record line and applies to all AND/OR lines.

If an exception record with an EXCPT name is conditioned by an overflow indicator, the record is written only during the overflow portion of the RPG/400 cycle or during fetch overflow. The record is not written at the time the EXCPT operation is processed.

An EXCPT operation with no fields can be used to release a record lock in a file. The UNLCK operation can also be used for this purpose. In the following figure, the record lock in file RCDA is released by the EXCPT operation.

Figure 2. Record Lock in File Released by EXCPT Operation

*...1....+....2....+....3....+....4....+....5....+....6....+....7...
CL0N01N02N03Factor1+++OpcdeFactor2+++ResultLenDHHiLoEqComments++++++
C*
C           KEY       CHAINRCDA
C                     EXCPTRELESE
*...1....+....2....+....3....+....4....+....5....+....6....+....7...
O
O*
ORCDA       E              RELESE
O*                    (no fields)


[ Top of Page | Previous Page | Next Page | Table of Contents ]