OpenTP1 Version 7 Programming Reference COBOL Language
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
Specify OUTPUT indicating a send-only message.
Specify this clause to receive a status code. If this clause is omitted, a status code cannot be received.
Specify the data item for which the logical terminal name was specified.
This clause is specified to timer-start the application program.
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
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.
Specify whether the segment to be passed to the application program to be activated is the last segment of a logical message.
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:
|
|
If a non-response type MHP or SPP is to be started:
|
|
If an MHP of the response type or continuous inquiry-response type is to be started:
|
|
If an application is to be started from an SPP:
|
|
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
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.