OpenTP1 Version 7 Programming Reference C Language
dc_mcf_ap_info - Report the application information
Format
ANSI C, C++
#include <dcmcf.h>
int dc_mcf_ap_info(DCLONG flags, char *mcfid, char *apname,
struct DC_MCFAPINFO *apinfo,
char *resv01, DCLONG resv02)
|
K&R C
#include <dcmcf.h>
int dc_mcf_ap_info (flags, mcfid, apname, apinfo, resv01,
resv02)
DCLONG flags;
char *mcfid;
char *apname;
struct DC_MCFAPINFO *apinfo;
char *resv01;
DCLONG resv02;
|
Description
The function dc_mcf_ap_info() acquires various types of application information from an MHP.
This function can be used to report the application information on the MHP that called the function dc_mcf_ap_info() or the other MHP. The application information becomes effective only when the function dc_mcf_ap_info() is normally terminated.
Argument whose values is set in the UAP
flags
Specify one of the following flags according to the type of the application to be referenced:
- DCMCFMYSELF
- Specify this flag to acquire the application information on the MHP that called function dc_mcf_ap_info().
- DCMCFOTHER
- Specify this flag to acquire the information on a specific application according to the process identifier for MCF communication service in which the application definition is included, and application name.
mcfid
- When specifying DCMCFMYSELF for flags
Specify NULL.
- When specifying DCMCFOTHER for flags
Specify a string indicating the MCF communication process identifier or the application startup process identifier in which the definition of the application to be referenced is included.
apname
- When specifying DCMCFMYSELF for flags
Specify NULL.
- When specifying DCMCFOTHER for flags
Specify the name of the application to be referenced.
When specifying an error event name (ERREVT1, ERREVT2, ERREVT3, or ERREVT4), the default value of the application definition, the no-response type DCMCF_NOANS is set in mcf_ap_type.
apinfo
Specify the address of the area DC_MCFAPINFO which receives the application information.
resv01
Specify NULL.
resv02
Specify DCNOFLAGS.
Arguments whose values are returned from OpenTP1
apinfo
The application information is returned with the structure DC_MCFAPINFO.
The structure has the following format:
struct DC_MCFAPINFO {
char mcf_apinfo[4];
DCLONG mcf_resv00;
char mcf_ap_name[9];
char mcf_ap_mcfid[3];
char mcf_resv01[4];
DCLONG mcf_ap_stat;
DCLONG mcf_ap_type;
char mcf_sg_name[32];
DCLONG mcf_sg_stat;
DCLONG mcf_sg_hold;
char mcf_sv_name[32];
DCLONG mcf_sv_stat;
DCLONG mcf_ap_ntmetim;
DCLONG mcf_ap_tempsize;
DCLONG mcf_ap_msgcnt;
DCLONG mcf_ap_trnmode;
DCLONG mcf_ap_quekind;
char mcf_resv02[72];
}
|
- mcf_apinfo
This area is used by the MCF.
- mcf_resv00
This area is used by the MCF.
- mcf_ap_name
The name of the application whose information is to be reported is returned.
- mcf_ap_mcfid
The process identifier for MCF communication service that includes the definition of the application whose information is to be reported is returned.
- mcf_resv01
This area is used by the MCF.
- mcf_ap_stat
The shutdown or release shutdown status of the application is returned with one of the following flags:
DCMCF_IN_DACT: Input shutdown status
DCMCF_SC_DACT: Schedule shutdown status
DCMCF_DACTSTAT: Input and schedule shutdown status
DCMCF_ACTSTAT: Release shutdown status
- mcf_ap_type
The type of the application is returned with one of the following flags:
(The type specified in the type operand of the -n option in the MCF application definition mcfaalcap is set here.)
DCMCF_ANS: Response type
DCMCF_NOANS: Non-response type
DCMCF_CONT: Continuous-inquiry-response type
When specifying DCMCFOTHER for flags and specifying an error event name (ERREVT1, ERREVT2, ERREVT3, or ERREVT4) for apname, the actual type is not reported. In this case, the default value of the application definition, no-response type (DCMCF_NOANS) is set here.
- mcf_sg_name
The name of the service group corresponding to the application is returned.
- mcf_sg_stat
The shutdown or release shutdown status of the service group is returned with one of the following flags:
Input shutdown status: DCMCF_IN_DACT
Schedule shutdown status: DCMCF_SC_DACT
Input and schedule shutdown status: DCMCF_DACTSTAT
Release shutdown status: DCMCF_ACTSTAT
- mcf_sg_hold
The holding or release holding status of the service group is returned with one of the following flags:
Input holding status: DCMCF_IN_HOLD
Schedule holding status: DCMCF_SC_HOLD
Input and schedule holding status: DCMCF_HOLDSTAT
Release holding status: DCMCF_RLSSTAT
- mcf_sv_name
The name of the service corresponding to the application is returned.
- mcf_sv_stat
The shutdown or release shutdown status of the service is returned with one of the following flags:
Input shutdown status: DCMCF_IN_DACT
Schedule shutdown status: DCMCF_SC_DACT
Input and schedule shutdown status: DCMCF_DACTSTA
Release shutdown status: DCMCF_ACTSTAT
- mcf_ap_ntmetim
The limit elapsed time for the non-transaction attribute MHP is returned.
When mcf_ap_trnmode is DCMCF_TRN, 0 is set here.
(The value specified in the ntmetim operand of the -v option in the MCF application definition mcfaalcap is set here. If the MCF application definition is omitted, the value specified in the ntmetim operand of the -v option in the MCF manager definition mcfmuap is used.)
- mcf_ap_tempsize
The size of the temporary-stored data storage area for the continuous-inquiry response is returned.
When mcf_ap_type is not DCMCF_CONT, 0 is set here.
(The value specified in the tempsize operand of the -n option in the MCF application definition mcfaalcap is set here.)
- mcf_ap_msgcnt
The maximum number of input messages that can be stored is returned.
(The value specified in the msgcnt operand of the -n option in the MCF application definition mcfaalcap is set here.)
- mcf_ap_trnmode
The transaction attribute of the application is returned with the flag as follows.
(The value specified in the trnmode operand of the -n option in the MCF application definition mcfaalcap is set here.)
Managed as a transaction: DCMCF_TRN
Not managed as a transaction: DCMCF_NONTRN
- mcf_ap_quekind
The queue to which the received message is assigned is returned with the flag as follows.
(The value specified in the quekind operand of the -g option in the MCF application definition mcfaalcap is set here.)
When the message is assigned to the disk queue: DCMCF_DISK
When the message is assigned to the memory queue: DCMCF_MEMORY
- mcf_resv02
This area is used by the MCF.
Return values
Return value |
Return value (numeric) |
Explanation |
DCMCFRTN_00000 |
0 |
Normal termination. |
DCMCFRTN_72000 |
-13000 |
The function dc_mcf_ap_info() was called from a service other than the MHP service. |
DCMCFRTN_72001 |
-13001 |
The specified application name is invalid.
Combination of the application name and process identifier is invalid. |
DCMCFRTN_72016 |
-13016 |
The value specified in a parameter is invalid. |
Other than the above occurred. |
An unprecedented error (e.g., program damage) |
Note
When two or more MHPs for ERREVT1, ERREVT2, ERREVT3, or ERREVT4 are started at the same time, the MHPs for the same error event name may have a different application type. For the MHPs other than the MHP that called function dc_mcf_ap_info(), the application type for the error event (ERREVT1, ERREVT2, ERREVT3, or ERREVT4) is not reported. In this case, the default value of the MCF application definition, no-response type is reported.
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.