OpenTP1 Version 7 Tester and UAP Trace User's Guide

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

11.1.3 Setting function return values

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

(a) Set return value

#: 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.

(b) Set event type
(c) Set output data

(4) Definition examples

(a) C
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;
(b) COBOL
CBLDCJNL(UJPUT)  = 0,
#CBLDCTRN(BEGIN) = 905,
CBLDCDAM(READ)   = 1600,
        :
        :
CBLDCLOG(PRINT)  = 1905;

(5) Notes