OpenTP1 Version 7 Programming Guide

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

3.8.1 Starting application programs

An MHP or SPP can be started from another MHP or an SPP. In the function dc_mcf_execap() [CBLDCMCF('EXECAP ')] (for starting application programs), specify the application name of the MHP or SPP to be started and the message segment to be transferred.

Organization of this subsection
(1) MCF processes used for starting application programs
(2) How to start application programs
(3) Time to start
(4) How to start application programs
(5) Error event if an error occurs before an application program is started
(6) Network communication definition
(7) Input source logical terminal name to be passed to the MHP to be started
(8) Handling of timer start upon TP1/Message Control rerun

(1) MCF processes used for starting application programs

When the application active facility (dc_mcf_execap()) is in use, an MCF process separate from the message exchange functions (such as dc_mcf_receive() and dc_mcf_send()) is used. The MCF process used for message exchanging is called an MCF communication process, whereas an MCF process used by the function dc_mcf_execap() is called an application startup process. Application startup processes do not depend on the communication protocol.

(2) How to start application programs

Only MHPs and SPPs can be started with the function dc_mcf_execap(). MHPs can be started by calling the function dc_mcf_execap().

(a) Ordinary starting of application programs (starting MHPs)

Segments sent from the function dc_mcf_execap() can be received with the function dc_mcf_receive() called by an MHP. MHPs can be started only if they exist in the same node as the UAP that called the function dc_mcf_execap(). MHPs at other nodes cannot be started using the function dc_mcf_execap().#

#
There is no restriction when communicating by using TP1/NET/HNA-NIF, because message exchanging is done with the function dc_mcf_execap().

(3) Time to start

The MHP or SPP which has been designated for activation will actually start when:

(4) How to start application programs

An MHP or SPP can be started by either of the following methods:

(a) Immediate start

The application program is started immediately after the UAP process which called the function dc_mcf_execap() is committed.

(b) Timer start

The application program is started at the specified time after the function dc_mcf_execap() is called. Timer starts in either of the following two ways:

(5) Error event if an error occurs before an application program is started

After the function dc_mcf_execap(), if an error occurs before the MHP or SPP is started, the following MCF events are generated:

For details on the error events, see 3.10 MCF events.

The figure below shows how to start an application program.

Figure 3-13 How to start application program

[Figure]

(6) Network communication definition

(a) MCF communication configuration definition

In addition to an ordinary execution process, an application startup process is required for the node at which the UAP that calls the function dc_mcf_execap() exists. Specify the application startup process in the application start environment definition. With OpenTP1 which uses the application program start function, create the application startup environment definition of the MCF communication configuration definitions.

(b) MCF application definition

The application type specified in the type operand of the application attribute definition (mcfaalcap) in the MCF application definitions determines which type of MHP is to be started.

(7) Input source logical terminal name to be passed to the MHP to be started

When an MHP starts another MHP by using the function dc_mcf_execap(), the started MHP receives the name in the first-received message as the logical terminal name of the message input source. Also, when the function dc_mcf_execap() is called from the MHP, the name in the first-message is passed as the logical terminal name of the message input source.

When an SPP starts an MHP by using the function dc_mcf_execap(), the started MHP receives * as the logical terminal name of the message input source. Also, when the function dc_mcf_execap() is called from the MHP, * is received as the logical terminal name of the message input source.

Figures 3-14 to 3-17 show how application programs are started, and specification of the type operand.

Figure 3-14 Starting MHP from MHP that received send-only message

[Figure]

Figure 3-15 Starting MHP from MHP that received inquiry-response message

[Figure]

Figure 3-16 Starting MHP, which sends send-only message, from MHP that handles inquiry-response message processing

[Figure]

Figure 3-17 Starting MHP from SPP handling transaction processing

[Figure]

(8) Handling of timer start upon TP1/Message Control rerun

Explained below is the handling of timer start upon an OpenTP1 rerun subsequent to a fault which occurs during wait for timer start. After an OpenTP1 rerun, timer start can be inherited only when the disk queue is in use. If a rerun occurs, the function dc_mcf_execap() to be timer-started is handled as follows:

(a) Definition of timer start inheritance

If reruntm=yes is specified for the -o option to the mcftpsvr definition command for the MCF communication configuration definition, the timer start message before the rerun is inherited. If the time specified in the function dc_mcf_execap() has already come, the timer start message is inherited as an immediate start message. Otherwise, the application program will be started at the specified time.

If reruntm=no is specified, timer start is not inherited once a rerun occurs. The timer-started function dc_mcf_execap() must be called from the UAP.

(b) User exit routines for modifying conditions for timer start inheritance

Definition of timer start inheritance user exit routines can be used to modify conditions for timer start inheritance. These user exit routines are called exit routines for determining timer start inheritance. Before a user exit routine for determining timer start inheritance can be used, reruntm=yes must be specified for the -o option to the mcftpsvr definition command for the MCF communication configuration definition.

For details on user exit routines for determining timer start inheritance, see 3.9.2 User exit routine that determines the inheriting timer-start message.