OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P

[Contents][Index][Back][Next]

6.5.1 CBLDCTRS('BEGIN ') - Transaction startup

Organization of this subsection
(1) Form
(2) Purpose
(3) Data area where the UAP sets values
(4) Data area for which a value is returned
(5) Status codes

(1) Form

(a) In a multi-thread environment
PROCEDURE DIVISION
 
CALL 'CBLDCTRS' USING identifier-1
 
DATA DIVISION
 
01 identifier-1.
   02 data-name-A PIC X(8)  VALUE 'BEGIN  '.
   02 data-name-B PIC X(5).
   02 FILLER     PIC X(3).
   02 data-name-C PIC S9(9) COMP.
 
(b) In a single-thread environment
PROCEDURE DIVISION
 
CALL 'CBLDCTRN' USING identifier-1
 
DATA DIVISION
 
01 identifier-1.
   02 data-name-A PIC X(8)  VALUE 'BEGIN  '.
   02 data-name-B PIC X(5).
 

(2) Purpose

Starts a global transaction from the CUP process that executes CBLDCTRS('BEGIN ').

Issue CBLDCTRS('BEGIN ') after executing CBLDCRPS('OPEN ').

One global transaction means a process between the point where CBLDCTRS('BEGIN ') is executed and a synchronization point (request to commit) for the transaction.

You cannot issue CBLDCTRS('BEGIN ') twice or more within the global transaction. This also applies to CBLDCTRS('BEGIN ') for the SPP. If the program is issued against this rule, it returns an error.

The SPP transaction attribute follows the specification of atomic_update in the user service definition.

(3) Data area where the UAP sets values

(4) Data area for which a value is returned

(5) Status codes

Status code Meaning
00000 Normal termination
02501 The request code (data-name-A) may be invalid.
02502 The program was issued from an incorrect context (for example, the program was issued within a transaction).
Alternatively, the function has been issued from an environment where both of the following conditions exist:
  • DCUTOKEY is specified in the client environment definition.
  • A permanent connection is being established with a RAP-processing server.
02504 Insufficient memory
02506 Network error
02507 Timeout occurred during processing of CBLDCTRS('BEGIN ').
02510 The client extended service has not started. Check whether clt_conf is specified correctly in the system service configuration definition. Alternatively, the transactional RPC executing process has not started. Check whether clt_trn_conf is specified correctly in the client service definition.
02515 OpenTP1 is inactive.
02517 An insufficient memory condition occurred within the transaction process.
02518 System error
02542 The permanent connection was released from the CUP executing process.
02544 The client ID specified for data-name-C differs from the one received with CBLDCCLS('CLTIN ') or CBLDCCLS('EXCLTIN ').
02545 A new transaction could not be started because the server's transaction processing was overloaded. If this status code returns, it is highly possible that the program will succeed if reexecuted. Reexecute the program.
02547 The specified port number is in use, or port numbers that can be assigned automatically by the operating system are insufficient.
03406 An error occurred in the resource manager (RM). No transaction could occur.
03407 A transaction could not be started because an error occurred in the transaction service. If this status code returns, it is highly possible that the program will succeed if reexecuted. Reexecute the program.