The TBCENTRY control statement is permitted only for COB1 program units. COBOL program units that are not ILCS-compatible must be generated with PROGRAM ...,COMP=COB1 in openUTM. TCB entries offer benefits when used in conjunction with COBOL-DML, and in the case of a GOTO in a PERFORM routine. Further information can be found in the openUTM manual „Programming Applications with KDCS”.
TCB entries are used to create nested reentrant COBOL programs. They are required in the following cases:
In conjunction with COBOL-DML:
if the USE-DATABASE-EXEPTION clause is used in a DECLARATIVES subsection and the program run is terminated within these declaratives using PEND. In this case, you must specify the TCB entry I$ITCUPS; otherwise, the DECLARATIVES counter will not be reset, resulting in a COBOL error action. I$ITCUPS therefore resets the counter if a PEND occurs within the declaratives.In the case of a GOTO in a PERFORM routine:
If a program unit is terminated in a PERFORM routine, the COBOL runtime system notes the return address. If you branch to the PERFORM routine using GOTO in the next program unit, the program unit behaves as if the PERFORM routine were still open and branches to the return address. Markers are reset by specifying a TCB entry (with any name).
TCB entries must also be made known to the COB1 compiler using the COBRUN parameter.
The TCBENTRY statement can be issued several times.
|
|
tcbentry_groupname | |
Freely selectable name up to eight characters in length, which is used to address the group of TCB entries defined in this TCBENTRY statement, and to link the group of TCB entries to a TAC statement. | |
ENTRY= | TCB entry name. |