Previous Topic: TERM-FAIL-TYPENext Topic: Retrieve DB2 SQLCA Data


Remaining Fields

The list of remaining CBLTERM fields is as follows:

TERM-ERROR-ACTION-NAME

Contains the name of the action block.

TERM-DEFAULT-MSG

This is an output field that by default contains the following message:

TIRM000E: SYSTEM ERROR OCCURRED - CONTACT SUPPORT

The message can be changed in the termination exit to anything meaningful to the user. For online procedures with a screen, the message is visible in the error message field when the screen is redisplayed.

TERM-SYSTEM-PRINTER

TERM-SYSTEM-PRINTER is valued with the printer TERMID if the action block executed a PRINTER TERMINAL IS statement.

TERM-ERROR-ENCOUNTERED-SW

Indicates the message:

TIRM037E: ** A FATAL ERROR HAS BEEN ENCOUNTERED **
TERM-VIEW-OVERFLOW-SW

Indicates the message:

TIRM037E: ** FATAL VIEW OVERFLOW HAS BEEN ENCOUNTERED **
TERM-ACTION-ID

Is appended to the message:

TIRM034E: LAST OR CURRENT DATABASE STATEMENT = ...
TERM-ATTRIBUTE-ID

Is appended to the message:

TIRM040E: PERMITTED VALUES MISMATCH, FIELD = F ...
TERM-STATUS-FLAG

Produces the message:

TIRM038E: ** FATAL DATABASE ERROR HAS BEEN ENCOUNTERED **
TERM-LAST-STATUS

Is appended to the message:

TIRM039E: DB LAST STATUS = ...
TERM-TRACE-PTR

This field is documented in online help under the error message TIRM039E.

TERM-LAST-STATEMENT-NUM

Is appended to the message:

TIRM035E: CURRENT STATEMENT BEING PROCESSED = ...
TERM-CURR-AB-ID

Is appended to the message:

TIRM032E: LAST OR CURRENT ACTION BLOCK ID = ...
TERM-CURR-AB-NAME

Is appended to the message:

TIRM033E: LAST OR CURRENT ACTION BLOCK NAME = ...
TERM-EABPCB-CNT, TERM-EABPCB-ENTRY,TERM-EABPCB-PTR

These fields describe PCB pointers. The first is the IO-PCB, the second is the ALTERNATE-IO-PCB; the last is a database pointer.

TERM-SQLCA-PTR

The following is a pointer to the SQLCA. The address fields of the SQLCA, first define it in linkage. Use the following example:

MY-SQLCA
FILLER
MY-SQL-CODE
FILLER

Add a SET statement at the beginning of the procedure division:

SET ADDRESS OF MY-SQLCA TO TERM-SQLCA-PTR
TERM-IEF-COMMAND

The special field of COMMAND.

TERM-IEF-TRANCODE

The special field of TRANCODE.

TERM-EXIT-STATE

The exit state number.

TERM-EXIT-INFOMSG

The exit state message.

TERM-USER-ID

The special field of USERID.

TERM-TRMINAL-ID

The special field of TERMID.

TERM-PRINTER-ID

Represents the ID of the system printer.

TERM-DIALOG-MESSAGE-NUM

The message number is the FAIL-MSG-NO set be the Dialog Manager. See the Message Guide for the message that is represented by the error code displayed.

TERM-OUTPUT-MESSAGE

Before calling the termination exit, TIRFAIL, prepares a table of messages that it display on return from the exit if the TERM-STATUS-CODE is a space or a zero. These messages are available to the exit. The last line with a message is followed by a line of all spaces.

TERM-DIALECT-NAME

The current dialect

TERM-FAILURE-MESSAGE-TEXT

The text of the failure message. This is moved to TERM-DEFAULT-MSG if you want it displayed on the application screen instead of the message:

TIRM000E: SYSTEM ERROR OCCURRED - CONTACT SUPPORT