OpenTP1 Version 7 Programming Reference COBOL Language
CBLDCTRN('INFO ') - Report the information about the current transaction
Format
PROCEDURE DIVISION specification
CALL 'CBLDCTRN' USING unique-name-1 |
DATA DIVISION specification
01 unique-name-1. 02 data-name-A PIC X(8) VALUE 'INFO '. 02 data-name-B PIC X(5). 02 FILLER PIC X. 02 data-name-C. 03 data-name-D PIC S9(4) COMP VALUE ZERO. |
Description
CBLDCTRN('INFO ') reports whether the UAP that called CBLDCTRN('INFO ') is operating as the current transaction.
Only the process that started the UAP created correctly according to the specification in this manual is permitted to call CBLDCTRN('INFO '). To terminate the service that called CBLDCTRN('INFO ') normally, the transaction attribute must be set in the UAP execution environment.
Data areas whose values are set in the UAP
data-name-A
Specify VALUE 'INFO' for the request code indicating that information about the current transaction is reported. The contents remain unchanged for processing after CBLDCTRN('INFO ') is executed.
data-name-C
This area stores information about the current transaction. Specify 0.
data-name-D
Specify 0.
Data area whose value is returned from OpenTP1
data-name-B
A status code of 5 digits is returned.
Status codes
Status code | Explanation |
---|---|
00001 | The process that called CBLDCTRN('INFO ') is operating as a transaction. |
00000 | The process that called CBLDCTRN('INFO ') is not operating as a transaction. |
00908 | The request code is invalid. |
Example
01 MISC. 02 CMD-CODE PIC X(8). 02 STATUS-CODE PIC X(5). 02 FILLER PIC X. 02 TRAN-INFO. 03 LEN PIC S9(4) COMP. : : MOVE ZERO TO LEN OF TRAN-INFO OF MISC. MOVE 'INFO' TO CMD-CODE OF MISC. CALL 'CBLDCTRN' USING MISC. IF STATUS-CODE OF MISC NOT EQUAL TO '00001' THEN MOVE 'NOW IN TRANSACTION' TO ERRMSG OF OUT-ERROR-REC WRITE OUT-ERROR-REC END IF. |
Note
This API does not obtain a UAP trace.
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.