OpenTP1 Version 7 Tester and UAP Trace User's Guide
To enable a simulated OpenTP1 function to return a fixed value, create a function return values file and set the value in the file.
Using this file, you can also set event types for the XATMI functions tpsend and tprecv and the output data (node ID and server name) to be passed to a function used by the multi-node facility.
Definition and coding are the same as for the offline tester environment definition.
- Organization of this subsection
- (1) Syntax
- (2) Function
- (3) Operands
- (4) Definition examples
- (5) Notes
(1) Syntax
(a) Set return value
{function-name|program-name(request-code)} = return-value {,|;}
|
(b) Set event type
{tpsend|tprecv} = TPEEVENT,
{tpsend(event)|tprecv(event)} = event-type {,|;}
|
(c) Set output data
{function-name-for-multinode(node_id)|function-name-for-multinode(sv_name)} = {node-ID|server-name}{,|;}
|
(2) Function
Defines a user-specified value as the return value for an OpenTP1 function. Or, defines an event type for the XATMI function tpsend or tprecv, or the output data (node ID and server name) to be passed to TP1/Multi function.
(3) Operands
- function-name | program-name (request-code)
Specify a function name or program name (request code) for returning the value.
- function-name
- Return value for C function
- program-name (request-code)
- Return value for COBOL program. Set the request code in parentheses.
- return-value ~<1-39 alphanumerics>
Set the return value (or return code for COBOL) to be returned by the function or program.
Write the return value as an upper-case constant name. Use a constant name also when setting a COBOL return code for a TX function.
Alternatively, the return value can be set as a numeric value (decimal) in the following range:
Interface |
Specifiable range |
C interface |
-99999 to 99999 |
COBOL interface |
0 to 99999# |
- Note
- A specification outside the specifiable range is regarded as a character string.
- #: For a TX function, specify the return code within the range -99999 to 99999.
If an undefined constant name is specified or if a numeric value is incorrectly specified (non-numeric, for example), the offline tester assumes that the function returned normally.
- {tpsend|tprecv} = TPEEVENT
Indicates that the subsequent coding sets an event type.
- tpsend(event)|tprecv(event)
Specify the function to which the event type applies.
- tpsend(event)
- Event type for tpsend function
- tprecv(event)
- Event type for tprecv function
- event-type
Set the event type for the tpsend or tprecv function. If specification is omitted, TPEV_SVCERR is assumed.
- function-name-for-multimode (node_id) |function-name-for-multimode (sv_name)
Specify the function name to which the output data applies and the output data type, as follows:
- node_id
- Sets the node ID as the output data.
- sv_name
- Sets the server name as the output data.
The following function names and output data types can be specified:
Function name |
Type of output data |
dc_adm_get_nd_status_next |
node_id |
dc_adm_get_sv_status_next |
sv_name |
dc_adm_get_nodeconf_next |
node_id |
dc_adm_get_node_id |
node_id |
- node-ID | server-name
Specify the node ID or server name.
Node IDs and server names are associated with the sequence of multi-node functions issued by the UAP in the order in which they are specified in the function return values file.
When a node ID or server name is omitted or incorrectly specified, that line of coding is ignored and the system processes the specifications as if the node ID or server name does not exist. Therefore, the node ID or server name is not counted.
When the UAP issues more functions than the number of node IDs and server names in the function return values file, DCADMER_NO_MORE_ENTRY is returned by the excess functions (but not by the dc_adm_get_node_id function).
(4) Definition examples
dc_jnl_ujput = 0,
dc_dam_open = DCDAMER_PROTO,
#dc_trn_begin = DC_OK,
dc_dam_read = -1600,
tpsend = TPEEVENT,
tpsend(event) = TPEV_DISCONIMM,
dc_adm_get_nd_status_next(node_id) = ND01
:
:
dc_logprint = DC_OK;
|
CBLDCJNL(UJPUT) = 0,
#CBLDCTRN(BEGIN) = 905,
CBLDCDAM(READ) = 1600,
:
:
CBLDCLOG(PRINT) = 1905;
|
- During definition analysis, the system does not check the validity of the functions and return values or the relationships among them.
- A format error occurs when an unsupported function, a function that does not return a return value, or a function that accesses a DAM file in the offline environment is specified as a function name.
- Duplicate specifications (same function name, or a function and a program that perform the same process) are not permitted. If specifications are duplicated, the system sets the return value specified first.
- When a format error is detected during definition analysis, an error message is output and analysis continues. The table below shows whether each definition statement is valid or invalid when a format error occurs.
Format error |
Valid |
Assumed specification when valid |
, or ; missing at the end of statement. |
Y |
, |
Other |
N |
-- |
- Legend:
- --: Not applicable
- Request codes must be those listed in the manual OpenTP1 Programming Reference COBOL Language. However, for the following processes, specify the request code shown below.
Description |
Request code |
Delete records in TAM table |
DELT |
Input TAM records |
READ |
Update or output TAM records |
WRIT |
- Specify the following return values for a COBOL program that returns a status code at normal termination:
- CBLDCADM(STATUS)
- Set the status code for the user server.
- CBLDCTAM(GST)
- Set the following values:
- 1: RO (open status)
- 2: RC (close status)
- 3: HL (logical shutdown status)
- 4: HO (error shutdown status)
- Examples:
- If CBLDCADM(STATUS)=1 is set, the return information is:
Return value=0
User server status code=1
|
- If CBLDCTAM(GST)=3 is set, the return information is:
Return value=0
TAM table status=HL (logical shutdown status)
|
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.