OpenTP1 Version 7 Programming Reference COBOL Language

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

CBLDCMCF('TIMERSET') - Set user timer monitoring

Format

PROCEDURE DIVISION specification

CALL  'CBLDCMCF' USING unique-name-1 unique-name-2
                 unique-name-3.

DATA DIVISION specification

01 unique-name-1.
   02 data-name-A  PIC X(8) VALUE 'TIMERSET'.
   02 data-name-B  PIC X(5).
   02 FILLER     PIC X(3).
   02 data-name-C  PIC X(16).
01 unique-name-2.
   02 data-name-D  PIC 9(9) COMP.
   02 data-name-E  PIC 9(9) COMP.
   02 data-name-F  PIC X(16).
   02 data-name-G  PIC X(8).
   02 data-name-H  PIC X(8).
   02 data-name-I   PIC X(16).
01 unique-name-3.
   02 data-name-J   PIC 9(9) COMP.
   02 data-name-K  PIC X(n).

Description

Use CBLDCMCF('TIMERSET') from a UAP to set the user timer monitor for monitoring the desired interval. To call CBLDCMCF('TIMERSET'), you must specify usertime=yes in the -p option of the MCF communication configuration definition mcfttim.

Only a user server can call CBLDCMCF('TIMERSET').

When the time (in seconds) specified for data-name-D elapses (when timeout occurs), the logical terminal specified for data-name-G generates an event and starts the MHP having the application name specified for data-name-H.

The MHP to be started when timeout occurs must be a non-response-type (noans type) MHP. The figure below shows the format of the area indicated by unique-name-3 and the segment area passed to the MHP when a message is passed to the MHP.

[Figure]

To cancel the user timer monitor set by CBLDCMCF('TIMERSET'), call the CBLDCMCF('TIMERCAN') function with the same values specified for data-name-E and data-name-G as specified in CBLDCMCF('TIMERSET').

The time monitor starts as soon as CBLDCMCF('TIMERSET') is called.

The maximum number of time monitors you can run concurrently is indicated by the maximum number of time monitoring requests specified for the timereqno operand in the -p option of the MCF communication configuration definition mcfttim.

Data areas whose values are set in the UAP

data-name-A

Specify VALUE 'TIMERSET' for the request code indicating specification of user timer monitoring.

data-name-C

Specify LOW-VALUE.

data-name-D

Specify the number of seconds that are to elapse before the MHP is started after CBLDCMCF('TIMERSET') is called. The specifiable range is 1 to 360000 (from 1 second to 100 hours).

Since OpenTP1 monitors timeout at fixed intervals, an error arises between the time specified for data-name-D and the time that elapses before actual detection of timeout. The accuracy of time monitoring depends on the value of the interval of time monitoring specified for the btim operand in the -t option of the MCF communication configuration definition mcfttim.

data-name-E

Specify the timer request identifier.

data-name-E provides information for identifying this timer. Be sure to specify a value for data-name-E that is unique in the logical terminal specified for data-name-G.

data-name-F

Specify LOW-VALUE.

data-name-G

Specify the name of the logical terminal that is to generate an event when timeout occurs. When specifying a name consisting of fewer than 8 characters, pad the name by entering spaces after the name.

data-name-H

Specify the application name of the MHP to be started. Define the attribute of the application in the application attribute definition (mcfaalcap) in the MCF application definition specified for the -a option of the MCF communication configuration definition mcftenv of the MCF communication server having the logical terminal name specified for data-name-G. When specifying a name consisting of fewer than 8 characters, pad the name by entering spaces after the name. The MHP must be a non-response-type (noans type) MHP. The specified application name must be a user event.

data-name-I

Specify LOW-VALUE.

data-name-J

Specify the length of the message segment to be passed to the MHP to be started. If no segment is to be passed to the MHP to be started, specify 0. The specifiable range is 0 to 256. The maximum specifiable value depends on the maximum message length specified for the msgsize operand in the -p option of the MCF communication configuration definition mcfttim.

data-name-K

Specify the contents of the message segment to be passed to the MHP to be started. You cannot specify multiple segments. If no segment is to be passed to the MHP to be started, specify a null character.

Data area to which a value is returned from OpenTP1

data-name-B

A status code of 5 digits is returned.

Status codes

Status code Explanation
00000 Normal termination.
72016 The value specified for data-name-C is invalid.
72028 The value specified for data-name-A is invalid.
70900 The value specified for data-name-I is invalid.
70909 The value specified for data-name-D is invalid.
70910 The value specified for data-name-E is invalid.
The specified timer request identifier is already registered.
70911 The value specified for data-name-F is invalid.
70912 The value specified for data-name-G is invalid.
70913 The value specified for data-name-H is invalid.
70914 The value specified for data-name-J is invalid.
70915 The value specified for data-name-K is invalid.
70916 The requested facility is not defined in the MCF.
70917 User timer monitoring cannot be configured because there is no free space in the timer registration area. To obtain the necessary space in the timer registration area, change the value assigned to the timereqno operand of the -p option in the MCF communication configuration definition mcfttim. If necessary, also verify the value assigned to the -p option of the MCF manager definition mcfmcomn and the value assigned to the static_shmpool_size operand in the system environment definition.
Other than the above An unprecedented error (e.g., program damage) occurred.