7.5 EXIT_PARAMS

EXIT_PARAMS supply information about the associated EXIT-REC-BUF when the call type is PROCESS_RECORD or DISCARD_RECORD. The exit routines can alter certain EXIT_PARAMS to change how the caller processes returned records. The EXIT_PARAMS structure includes the following:

Exit Parameter Description
AUDIT_TIMESTAMP

Provides the Julian, GMT timestamp of the audit block in which the record was found. This timestamp approximates the time of the original database operation.

BEFORE_AFTER_IND

For update records, determines whether the record is a before-image (B) or after-image (A). When extracted, before-images precede after-images within the same update. Inserts are after-images, and deletes are before-images.

ERR_INFO

This information is supplied with a discarded record to indicate the reason for the discard. The error number (ERR_NUM) is passed, along with a possible file or SQL error and error text.

FUNCTION_PARAM

Lets you pass a parameter to the exit. This parameter is set up in the Extract or Replicat parameter file as part of the FILE or MAP parameter.

The default size of EXIT_PARAMS is 256 bytes. If the string supplied with the EXITPARAM parameter is shorter, it will be a NULL terminated string. Use the GET_EXITPARAM_VALUE function to access data over that length.

MORE_RECS_IND

Set by the user on return from an exit. For database records, determines whether Extract or Replicat processes the record again.

This allows the exit program, for example, to output many records per record processed by Extract, a common function when converting Enscribe to SQL (data normalization). To request the same record again, set MORE_RECS_IND to Y.

RECORD_LEN

Provides the length of the record buffer passed. Change RECORD_LEN if the Extract SOURCE_FILE parameter is altered to reflect the new length of the buffer.

RECORD_TYPE

Identifies the record as SQL or ENS for Enscribe.

SOURCE_FILE

Identifies the type of record passed to the exit during Extract processing. When custom mapping is performed, it is sometimes appropriate for the exit routines to change this field. For example, if the exit uses the record buffer from $DATA5.FLS.ACCTFL and changes it to the format of $DATA6.TABS.ACCTTAB, your exit should change SOURCE_FILE to $DATA6.TABS.ACCTTAB.

UPDATE_TYPE

Determines the type of operation associated with the record buffer. Operations types are:

  • INSERT_IO

    The record is an insert to the source file.

  • DELETE_IO

    The record is a delete, and the buffer is the image of the record being deleted.

  • UPDATE_IO

    The record is an update to the source file. The full after update image is supplied.

  • UPDATE_COMP_ENSCRIBE

    The record is a compressed Enscribe update. Only primary key fields and changed fields are supplied. Routines are supplied to overlay each field in its corresponding uncompressed location.

  • UPDATE_COMP_PK_SQL_VAL

    The record is a primary key update. It contains three parts in the data portion of the record: 1) the before-image key length, 2) the before-image key values in field comp format, and 3) the after-image in field comp format.

  • UPDATE_COMP_SQL

    The record is a compressed SQL update. Only primary key fields and changed fields are supplied. Routines are supplied to overlay each field in its corresponding uncompressed location.