dc_uto_test_status - Report the test status of a user server
Format
ANSI C, C++
#include <dcuto.h>
int dc_uto_test_status (struct DC_UTOSTAT *test_stat,
DCLONG flags) |
K&R C
#include <dcuto.h>
int dc_uto_test_status (test_stat, flags)
struct DC_UTOSTAT *test_stat;
DCLONG flags; |
Description
The function dc_uto_test_status() returns the status of testing a user server that called this function. The test status is stored in an argument after this function returns normally. If this function returns with an error, information on the test status stored in the argument is undefined.
Arguments whose values are set in the UAP
test_stat
Specify the address of the structure indicating the status of testing a user server.
flags
Specify DCNOFLAGS.
Arguments whose values are returned from the OpenTP1
test_stat
Information on the status of testing a user server is returned with a structure. The structure formats are as follows:
struct DC_UTOSTAT {
char testID[5];
char mode;
char gbl_tran;
char type;
char svr_tran;
char comd;
char _res[22];
}; |
- testID
The test user ID (the value set for the environment variable DCUTOKEY) is returned.
- mode
Whether the user server is operating in the test mode is returned.
- DCUTO_TEST: Operating in the test mode.
- DCUTO_NOTEST: Not operating in the test mode.
- gbl_tran
The processing status of the global transaction is returned.
- DCUTO_TRN_COMMIT: Commits in the synchronization point processing.
- DCUTO_TRN_ROLLBACK: Rolls back in the synchronization point processing.
- DCUTO_TRN_NOTRN: Non-transaction status
- NULL (null character): Non-test mode. MHP linked with an MCF library.
- type
The test type specified in the test_mode operand of the user service definition is returned.
- DCUTO_TEST_MODE_TARGET: UAP dedicated to the test (target)
- DCUTO_TEST_MODE_USABLE: Usable UAP (usable)
- DCUTO_TEST_MODE_SIMMHP: Simulate MHP (simmhp)
- DCUTO_TEST_MODE_NO: UAP ineligible for the test (no)
- svr_tran
Method of handling the transaction at the synchronization point specified in the test_transaction_commit operand of the user service definition is returned.
- DCUTO_TRN_COMMIT: Commits (Y) at the synchronization point.
- DCUTO_TRN_ROLLBACK: Rolls back (N) at the synchronization point.
- NULL (null character): Non-test mode. MHP linked with an MCF library.
- comd
Method of handling the command execution result specified in the test_adm_call_commit operand of the user service definition is returned.
- DCUTO_COMMAND_DO: Executes the command (do).
- DCUTO_COMMAND_SKIP: Sets an assumption value as an execution result (skip).
- DCUTO_COMMAND_FILE: Uses data in the operation command result data file (file).
- NULL (null character): Non-test mode. MHP linked with an MCF library.
Return values
Return value | Return value (numeric) | Explanation |
---|
DC_OK | 0 | Normal termination. The test status is returned in the area indicated by the structure DC_UTOSTAT. |
DCUTOER_PROTO | -2701 | The function dc_rpc_open() is not called. |
DCUTOER_TRAN | -2734 | The UAP is linked with an OpenTP1 library which is inoperable with the current transaction service. |
DCUTOER_PARAM_FLAGS | -2757 | The value specified for flags is invalid. |
DCUTOER_PARAM_ADDS | -2758 | The value specified for test_stat is invalid. |
Note
When the function dc_uto_test_status() is called from an MHP, the following values are returned to the structure DC_UTOSTAT:
- testID: Test user ID
- mode: Current service mode
- gbl_tran: Null character
- type: DCUTO_TEST_MODE_NO
- svr_tran: Null character
- comd: Null character