OpenTP1 Version 7 Programming Reference COBOL Language

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

SEND - Activate an application program

Format 1

(When specifying the message to be passed to the application program to be activated and activating the application program)

DATA DIVISION (communication description entry) specification

CD  communication-description-name
    FOR  OUTPUT  PROGRAM
    [STATUS  KEY  IS  data-name-1]
    SYMBOLIC  TERMINAL  IS  data-name-2
    [ACTIVE {INTERVAL|TIME}  IS  data-name-9].
 
01 unique-name-1.
   02 data-name-10  PIC  9(4) COMP.
   02 data-name-11  PIC  X(2).
   02 data-name-12  PIC  X(n).
01 unique-name-2.
   02 data-name-13  PIC  X(1).

PROCEDURE DIVISION specification

SEND  communication-description-name  FROM  unique-name-1
     [WITH {ESI|EMI|unique-name-2}] .

Format 2

(When reporting termination of message transfer after a request to transfer a segment other than the last segment is sent)

DATA DIVISION (communication description entry) specification

CD  communication-description-name
    FOR  OUTPUT  PROGRAM
    [STATUS  KEY  IS  data-name-1]
    SYMBOLIC  TERMINAL  IS  data-name-2.

PROCEDURE DIVISION specification

SEND  communication-description-name  WITH  EMI.

Description

SEND enables the following CALL interface facility:

The maximum length of a single message segment that can be sent is 32 kilobytes. Note that the actual maximum length might be smaller than this value depending on the protocol. For details, see the relevant description in the applicable OpenTP1 Protocol manual.

Items specified in the communication description entry

FOR clause

Specify OUTPUT indicating a send-only message.

STATUS KEY clause

Specify this clause to receive a status code. If this clause is omitted, a status code cannot be received.

SYMBOLIC TERMINAL clause

Specify the data item for which the logical terminal name was specified.

ACTIVE clause

This clause is specified to timer-start the application program.

INTERVAL: Interval timer start

TIME: Time point timer start

data-name-9
Interval timer start
Specify a period of time in hours, minutes, and seconds. The MHP or SPP will start the specified period of time after the application program start statement is issued. The period of time is specified in the format of HHMMSS00 where HH indicates hours, MM indicates minutes, SS indicates seconds, and 00 is fixed. The range of specifiable times is from 00000100 (start after one second) to 99595900 (start after 99 hours 59 minutes 59 seconds).
Time point timer start
Specify the time at which the MHP or SPP is to start. The time is specified in the format of HHMMSS00 where HH indicates hours, MM indicates minutes, SS indicates seconds, and 00 is fixed. The range of specifiable times is from 00000000 (start at 00:00:00) to 23595900 (start at 23:59:59) in local time.

If nothing is specified, immediate start is assumed.

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

Items specified in the communication statement

unique-name-1

Specify the data item indicating the send area of the message segment which is to be passed to the application program to be activated. The following figure shows the format of the segment which is passed to MHP to be activated.

[Figure]

WITH clause

Specify whether the segment to be passed to the application program to be activated is the last segment of a logical message.

ESI: Specify ESI for the first segment or an intermediate segment.

EMI: Specify EMI for the last segment. EMI must also be specified if the message to be passed consists of a single segment.

unique-name-2: Data item for which either of the following values was specified

'1': ESI (first or intermediate segment)

'2': EMI (last or single segment)

If this clause is omitted, EMI (last or single segment) is assumed.

Status codes

Status code Explanation
00000 Normal termination.
71002 An error occurred during input/output processing for the message queue.
The message queue is in shutdown state.
The message queue was not allocated.
The value specified for the segment length exceeds 32000 bytes.
The SEND statement that starts application program cannot be accepted because the MCF is being terminated.
71003 The message queue is full.
71004 The buffer for storing messages could not be acquired in the memory.
71008 An attempt was made to start the application program, but the management table of the send destination could not be acquired.
The local memory of the process is insufficient.
72000 <Return at MHP execution>
The SEND statement that starts application program was used out of sequence. The SEND statement that starts application program was used before the RECEIVE statement that receives first segment was used from the MHP.
<Return at SPP execution>
The SEND statement that starts application program was called from SPP processing which was not transaction.
72001 The specified application name is not defined with the MCF.
The application name is incorrect.
The application startup process name is not specified in the communication service definition (mcfmcname definition command) included in the MCF manager definition.
No application startup process identifier is specified in the environment definition (-p option to the mcfaenv definition command) included in the MCF application definition for the application startup process.
The following two values do not match:
  • Application startup process identifier specified in the application environment definition (-p option to the mcfaenv definition command).
  • Application startup process identifier specified in the communication configuration definition (mcftenv definition command) for the application startup process.
If a non-response type MHP or SPP is to be started:
  • No logical terminal (the lname operand of the -n option to the mcfaalcap definition command) is specified in the application attribute definition for the application to be started.
  • The logical terminal specified in the application attribute definition for the application to be started is not defined in the communication configuration definition (mcftalcle definition command) for the application startup process.
  • The logical terminal specified in the application attribute definition for the application to be started is not of the send-only (=send) type.
  • The logical terminal specified in the application attribute definition for the application to be started cannot use the application startup process.
If an MHP of the response type or continuous inquiry-response type is to be started:
  • No internal communication path (cname operand of the -n option to the mcfaalcap definition command) is specified in the application attribute definition for the application to be started.
  • The internal communication path specified in the application attribute definition for the application to be started is not defined in the communication configuration definition (-c option to the mcftpsvr definition command) for the application startup process.
  • The logical terminal specified in the communication configuration definition (mcftalcle definition command) for the application startup process is not of the inquiry-response type (=request).
If an application is to be started from an SPP:
  • The mcf_psv_id operand in the user service definition or user service default definition for the caller UAP is assigned no application startup process identifier.
  • The following two values do not match:
    Application startup process identifier assigned to the mcf_psv_id operand in the user service definition or user service default definition for the caller UAP
    Application startup process identifier specified in the communication configuration definition (-s option to the mcftenv definition command) for the application startup process or in the application environment definition (-p option to the mcfaenv definition command)
  • The following two values do not match:
    MCF manager identifier assigned to the mcf_mgrid operand in the user service definition or user service default definition for the caller UAP
    Identifier of the MCF manager to which the application startup process be/longs
72005 The value specified for the send segment length was less than 5 bytes when the application program with ESI (first or intermediate segment) specified for the WITH clause was activated.
72007 From a response type (type=ans) MHP, another response type MHP was started after the response message is sent.
From a continuous-inquiry-response type (type=cont) MHP, another continuous-inquiry-response type MHP was started after the response message is sent.
72009 A response type (type=ans) MHP was started more than once.
A continuous-inquiry-response type (type=cont) MHP was started more than once.
72011 From an MHP which is not response type (type=cont), a response type MHP was started.
From an MHP which is not continuous-inquiry-response type (type=cont), a continuous-inquiry-response type MHP was started.
72023 The contents of data-name-3 specified for the ACTIVE TIME clause are null.
72024 The value specified for the FOR clause is invalid.
72026 The value specified for the WITH clause is invalid.
72041 The SEND statement that starts application program was used incorrectly. The value specified for the send segment length was less than 4 bytes when a single segment was sent.
72044 The continuous-inquiry-response termination statement was used, the name of the application to be activated next was specified, then the SEND statement that starts application program was used.
72108 The value specified for data-name-9 exceeds the limit.
72109 An MHP for which type=cont (continuous-inquiry-response type) was specified in the MCF application definition was activated with timer start specified.
77001 The logical terminal (LE) corresponding to the application to be activated is being started and cannot be used, or it is not available due to another factor.
Other than the above An unprecedented error (e.g., program damage) occurred.

Notes

  1. The activation order of application programs varies depending on the mcfmuap -c order specification in the UAP common definition of the MCF manager definition.
  2. If you use a single service function to update a TAM or DAM file and call the SEND statement to start an application that will reference the updated file, make sure that the application will lock the file. If the application references the file without locking the file, the data existing before the file was updated might be referenced.