OpenTP1 Version 7 Programming Reference COBOL Language

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

Function format of user exit routine that determines the inheriting timer-start message

The user exit routine that determines the inheriting timer-start message is called in the following format:

Format

ANSI C , C++

#include <dcmpsv.h>
long uoc_func (dcmpsv_uoc_rtime *parm)

K&R C

#include <dcmpsv.h>
long uoc_func(parm)
 
dcmpsv_uoc_rtime *parm ;

Description

If the use of the timer-started application program activate (CBLDCMCF('EXECAP ')) is followed by an error which raises the need for rerunning OpenTP1, this user exit routine can change the timer-start environment. It can perform the following:

When installing in the MCF the user exit routine that determines the inheriting timer-start message, specify the address of the user exit routine function in the MCF main function for the application startup service. The MCF main function for the application startup service does not depend on the communication protocol.

For details on how to create the MCF main function for the application startup service, see the OpenTP1 Operation manual.

When uoc_func (user exit routine that determines the inheriting time-start message) is called, the following parameters are passed from the MCF to parm.

Parameters

dcmpsv_uoc_rtime

typedef struct {
     char le_name[9] ;     ... Input source logical terminal name
     char reserve1[7] ;    ... Reserved
     char ap_name[9] ;     ... Application name
     char reserve2[7] ;    ... Reserved
     long exec_time ;      ... Timer start time
     char ap_type ;        ... Application type
                               'a': ans type; 'n': noans type
     char time_type;       ... Timer-start type
                               'i': Interval specification
                                  for timer start
                               't': Time point specification
                                    for timer start
     char reserve3[26] ;   ... Reserved
} dcmpsv_uoc_rtime;

Arguments whose value is passed from MCF to user exit routine

le_name

The input source logical terminal name is set here. If the application program activate (CBLDCMCF('EXECAP ')) is called from the SPP, '*' is set here.

ap_name

The application name specified by the UAP in the timer-started application program activate (CBLDCMCF('EXECAP ')) is set here.

exec_time

The MHP start time specified by the UAP in the timer-started application program activate (CBLDCMCF('EXECAP ')) is set here, as the number of seconds counted from 00:00:00 on January 1, 1970.

ap_type

The application type of the UAP which issued the timer-started application program activate (CBLDCMCF('EXECAP ')) is set here:

'a': ans type

'n': noans type

time_type

The timer-start type specified by the UAP in the timer-started application program activate (CBLDCMCF('EXECAP ')) is set here:

'i': Interval specification for timer start

't': Time point specification for timer start

Arguments whose value is set in the user exit routine

ap_name

To change the application to be timer-started, specify the new application name here. The name specified here has effect when DCMPSV_UOC_TIME_JUST is specified for the return value.

Return values

uoc_func() must return the following values:

Return value Explanation
DCMPSV_UOC_TIME_CONTINUE Timer-start is inherited
DCMPSV_UOC_TIME_JUST Immediate start will be in effect
DCMPSV_UOC_TIME_DEQ Timer-start is canceled

The subsequent MCF processing varies depending on the return value from uoc_func() as follows:

If another value is returned from the user exit routine, the segments to be timer-started are deleted from the output queue, with the output of a warning message (KFCA10710-W).

Notes on creating user exit routines