Previous Topic: PurposeNext Topic: Return Code


Arguments

The following table gives a brief description of each of the arguments.

Name

I/O

Description

RUNTIME-PARM1

input/ output

This is the DFHEIBLK which is automatically included if translated.

RUNTIME-PARM2

input/ output

This is the DFHCOMMAREA which is automatically included if translated.

TERM-EXIT-PARM-LIST

input/ output

Structure of parameters for termination and failure routine. The items in this structure are described in the below section called CBLTERM Field Definitions.

GLOBDATA

input

Global data, used internally.

CBLTERM Field Definitions

The structure TERM-EXIT-PARM-LIST is defined via in copy member CBLTERM. The items in this structure are as follows:

TERM-STATUS-CODE

When TIRFAIL calls TIRTERM(A/B), TERM-STATUS-CODE is used to control what TIRFAIL does next.

The following table provides a description of each TERM-STATUS-CODE value:

Value

Description

’ ’ (space) or 0 (zero)

TIRFAIL displays the message and redisplays the previous screen with TERM-DEFAULT-MSG in the error message field.

1

This value indicates that TIRTIRM(A/B) has handled the messages and will not display them. It will, however, redisplay the previous screen with TERM-DEFAULT-MSG in the error message field.

2

Thisvalue indicates that TIRTIRM(A/B) has handled everything. TIRFAIL does not display the messages and does not redisplay the previous screen.

TERM-FAIL-TYPE

The following table contains a description of TERM-FAIL-TYPE errors:

Error

Value

Decription

TERM-FAIL-DB2

P

A DB2 error occurred while accessing the RPROF (profile) table.

TERM-FAIL-IEC

I

An AllFusion Gen error occurred in the Dialog Manager.

TERM-FAIL-EXEC

E

A database error occurred in an action block or procedure.

TERM-FAIL-DIALOG

D

A non-database error occurred in the Dialog Manager.

TERM-FAIL-TSQ

Q

An error occurred while accessing the CICS temporary storage queue profile table.

Remaining Fields

The remaining CBLTERM fields are described in the table:

Field

Description

TERM-ERROR-ACTIONNAME

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-ERRORENCOUNTERED-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-STATEMENTNUM

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-IOPCB; 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

Then add a SET statement at the beginning of the procedure division as shown :

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-MESSAGENUM

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

TERM-OUTPUT-MESSAGE

Prior to calling the termination exit, TIRFAIL, prepares a table of messages that it will display on return from the exit if the TERM-STATUSCODE 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-MESSAGETEXT

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

TIRM000E: SYSTEM ERROR OCCURRED - CONTACT SUPPORT