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

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

6.3.1 CBLDCRPS('OPEN ') - UAP 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
(6) Notes

(1) Form

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

(2) Purpose

Initializes the environment for calling the OpenTP1 SPP or using the TCP/IP communication facility.

Always execute CBLDCRPS('OPEN ') before executing any RPC program or transaction control program.

(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
02401 Invalid value for the data name. The request code (data-name-A) may be invalid.
02402 CBLDCRPS('OPEN ') has already been executed.
02403 One of the following errors occurs.
  • Initialization failed.
  • No user authentication is performed.
  • The client environment definition is specified invalidly.
02415 OpenTP1 is inactive for the node corresponding to the specified service.
02447 The specified port number is in use.
02544 The client ID specified for data-name-D differs from the one received with CBLDCCLS('CLTIN') or CBLDCCLS('EXCLTIN ').

(6) Notes

In this case, wait 15 to 20 seconds, then execute CBLDCRPS('OPEN ').