OpenTP1 Version 7 Programming Reference C Language
dc_mcf_ap_info_uoc - Report the application information to user exit routines
Format
ANSI, C++
#include<dcmcf.h>
int dc_mcf_ap_info_uoc(DCLONG flags, char *apname,
struct DC_MCFAPINFO_UOC *apinfo)
|
K&R C
#include<dcmcf.h>
int dc_mcf_ap_info_uoc(flags, apname, apinfo)
DCLONG flags;
char *apname;
struct DC_MCFAPINFO_UOC *apinfo;
|
Description
The function dc_mcf_ap_info_uoc() returns information about the application specified by the argument apname (application information) to the struct DC_MCFAPINFO_UOC data area specified by the argument apinfo. This application information includes application definitions (application attribute definitions) and application status (status when the function dc_mcf_ap_info_uoc() is called). The application information becomes effective only when the function dc_mcf_ap_info_uoc() is normally terminated.
This function can only be used to report application information about user applications that can be activated from the communication service on which the user exit routine is running. Furthermore, it does not report the application information about SPPs (application definition mcfaalcap -g type=SPP) or system events (application definition mcfaalcap -n kind=mcf).
If a user application that cannot be activated from the communication service on which the user exit routine is running, an SPP, or a system event is specified, it is interpreted as invalid and the function returns with an error, and the return value DCMCFRTN_72001 is reported.
This function can be used only from user exit routines that edit input messages (user exit routines that determine application names). It cannot be used from user exit routines other than the above. If you attempt to use it from any other user exit routines, system operation is unpredictable.
Arguments whose values are set in the UAP
flags
Specify DCNOFLAGS.
apname
Specify the name of the application about which you want to acquire the application information.
apinfo
Specify the address of the area DC_MCFAPINFO_UOC that receives the application information.
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_UOC {
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;
DCLONG mcf_ap_msgcnt;
char mcf_sg_name[32];
DCLONG mcf_sg_stat;
DCLONG mcf_sg_hold;
DCLONG mcf_sg_msgcnt;
char mcf_sv_name[32];
DCLONG mcf_sv_stat;
DCLONG mcf_ap_ntmetim;
DCLONG mcf_ap_tempsize;
DCLONG mcf_ap_max_msgcnt;
DCLONG mcf_ap_trnmode;
DCLONG mcf_ap_quekind;
char mcf_resv02[64];
};
|
- 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:
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_ap_type
The type of the application is returned with one of the following flags:
Response type: DCMCF_ANS
Non-response type: DCMCF_NOANS
Continuous-inquiry-response type: DCMCF_CONT
(The type specified in the type operand of the -n option in the MCF application definition mcfaalcap is set here.)
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_ap_msgcnt
The number of remaining input messages in this application is returned.
- 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_sg_msgcnt
The number of remaining input messages in this service group is returned.
- 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_DACTSTAT
Release shutdown status: DCMCF_ACTSTAT
- mcf_ap_ntmetim
The limit of time that can be elapsed 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_max_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 one of the following flags:
Managed as a transaction: DCMCF_TRN
Not managed as a transaction: DCMCF_NONTRN
(The value specified in the trnmode operand of the -n option in the MCF application definition mcfaalcap is set here.)
- mcf_ap_quekind
The queue to which the received message is assigned is returned with one of the following flags:
When the message is assigned to the disk queue: DCMCF_DISK
When the message is assigned to the memory queue: DCMCF_MEMORY
(The value specified in the quekind operand of the -g option in the MCF application definition mcfaalcap is set here.)
- 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_uoc() was called from a service other than the MHP service. |
DCMCFRTN_72001 |
-13001 |
The specified application name is invalid.
No information about the specified application could be acquired. |
DCMCFRTN_72016 |
-13016 |
The value specified in a parameter is invalid. |
Other than the above |
An unprecedented error (e.g., program damage) occurred. |
Note
- The function dc_mcf_ap_info_uoc() can only be used from user exit routines that edit input messages (user exit routines that determine application names), even though no check is performed if this function is called from user exit routines other than the above. If you attempt to use it from any other user exit routines, system operation is unpredictable. For details about user exit routines, see the applicable OpenTP1 Protocol manual.
- This function can only be used to acquire application information about user applications that can be activated from the communication service on which the user exit routine is running. Furthermore, it does not report application information about SPPs (MCF application definition mcfaalcap -g type=SPP) or system events (MCF application definition mcfaalcap -n kind=mcf).
- No UAP trace can be acquired.
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.