RECEIVE exit routine

The RECEIVE exit routine allows you to scan statements in the SMPPTFIN data set at RECEIVE time. This exit routine must be defined by a GIMEXITS control statement in the GIMEXITS member of SMPPARM, which tells SMP/E RECEIVE processing that an exit routine exists and should be called. Optionally, the GIMEXITS control statement may also specify the data set containing the exit routine. This exit routine must be a load module residing in an authorized library. For more information about specifying exit routines in GIMEXITS, see Defining control statements in SMPPARM members. The RECEIVE exit routine is loaded at the start of RECEIVE command processing and is deleted at the end of RECEIVE processing.

When this exit routine is called, the parameter list contains the values shown in Table 1 and Table 2.
Table 1. RECEIVE exit routine: parameter list values
Field name Description
UXPUXNUM X'0001' (exit routine number)
UXPUXNAM Name of exit routine
UXPUXAD Address of exit routine
UXPFUNCT RECEIVE
UXPPRMAD Address of 81-byte buffer area (see Table 2)
Table 2. RECEIVE exit routine: buffer passed by UXPPRMAD
Field name Offset (DEC) Offset (HEX) Length Description
UX001RC + 0 + 0 1

X'00' – Buffer contains record to be processed

X'04' – End-of-file on SMPPTFIN

UX001RCD + 1 + 1 80 Record from SMPPTFIN

According to the input record, the RECEIVE exit may decide to continue RECEIVE processing, change the record, insert data after the record, or skip the record. Or, it may choose to stop processing for the SYSMOD, for the RECEIVE command, or for SMP/E.

When the exit routine returns control to SMP/E, it must set register 15 to one of the following values:
Value Meaning
 0 Continue normal RECEIVE processing.
 8 Stop SYSMOD processing. SMP/E does not receive this SYSMOD, but continues to pass records from the SYSMOD to the exit routine.
12 Stop RECEIVE processing.
16 Stop SMP/E processing.
20 Insert a record after the current one in the buffer.
24 Skip the record in the buffer area.

If any other value is returned, SMP/E issues an error message and fails.