EXEC CICS ISSUE SIGNAL
Send an asynchronous interrupt
When using EXEC CICS RECEIVE to receive data from a terminal, you should be aware that the data stream returned may contain SBA data if the screen was in a formatted state or was a 5250. In this case, you should consider using an EXEC
CICS RECEIVE MAP command instead.
Terminal-oriented task identification
When CICS receives input from a logical unit to which no task is attached, it has to determine which transaction is to be initiated. The CICS/400 application shell performs this transaction identification and task attachment. The methods by which the user can specify the transaction to be initiated and the sequence in which CICS tests these specifications are covered in the STRCICSUSR CL command in the
CICS for iSeries Administration and Operations Guide
.
When the task is attached, the application program for the transaction is connected to the logical unit for the duration of the task. The application shell directs terminal control to make this connection. The application program then communicates with the logical unit through terminal control commands.
Logical unit communication protocol
An application program communicates with an SNA logical unit by using terminal control commands. However, communication with logical units is governed by the conventions (protocols) that apply to each type of logical unit. This section describes the additional commands and options provided by CICS to enable application programs to comply with these protocols.
The following table summarizes the EXEC CICS command options that CICS/400 provides for these protocols. It shows the CICS/400 support for these options by logical unit type.
Table 8. CICS/400 LU protocol options
Option LU 1 LU 2 LU 3 LU 6.2
INVITE
CNOTCOMPL
DEFRESP
LAST
Passed
Passed
Passed
Passed
Yes
N/A
Passed
Passed
Yes
N/A
Passed
Passed
Yes
N/A
N/A
Yes
Note: Yes
—Option is supported.
Passed
—Option is ignored for logical units owned by the local CICS/400 system, but is passed to remote systems during transaction routing.
N/A
—Option is not applicable to this logical unit.
Send/receive mode
For SNA logical units, only one of the two ends of the session can be in send mode at any one time, that is, one is in send mode, the other is in receive mode. An application program in send mode can issue any commands for the logical unit.
On the other hand, one in receive mode, can issue only receive requests until the mode is changed back to send. The EIB indicator EIBRECV informs the application program that it is in receive mode and that it must perform the above operations.
170
CICS for iSeries Application Programming Guide V5
For displays, the transaction would normally be in send mode, if the INVITE option is not used, and can ignore the EIBRECV indicator. Displays work with a subset of the full protocols.
Send/receive protocol (INVITE option)
The INVITE option of an EXEC CICS SEND command informs the session partner that it is now in send mode and that it should send a reply. At the same time it places the transaction in receive mode. The transaction should now issue an EXEC
CICS RECEIVE command as its next operation.
Chaining the input data
You can present the data to the program in assembled chains. The unit of data from a logical unit is the request unit (RU). One or more RUs can be grouped together and treated as a chain. Chain assembly is done by OS/400, depending on logical unit type. When chain assembly is done, instead of an input request being satisfied by one RU at a time until the chain is complete, the whole chain is assembled and is sent to the CICS application program satisfying just one request.
This ensures that the integrity of the whole chain is known before it is presented to the application program.
The last RU in a chain (even if it is the only RU in the chain) raises an end-of-chain (EOC) condition. For logical units that do not send chained data (for example, the 3270 logical unit), the EOC condition occurs for every receive request.
For logical units that send chained data, the EOC condition usually occurs for every receive request, but it may not, depending on the length of the data. By using RESP options, you can detect the EOC condition and pass control to the next instruction in the program, where a decision can be made on subsequent
processing. See “How to use the RESP and RESP2 options” on page 87 for further
information about using RESP.
An EXEC CICS HANDLE CONDITION EOC command gives control to a user-written routine, which can do any additional processing required when the complete chain has been received. You can use the EXEC CICS IGNORE
CONDITION command to ignore the EOC condition in cases where it is raised on every EXEC CICS RECEIVE command.
Chaining the output data
As in the case of input data, output data is sent as request units (RUs). If the length of the data to be sent exceeds the RU size, the data is broken into several
RUs and they are sent as a chain. During transmission from CICS to the logical unit, the RUs are marked FIC (first-in-chain), MIC (middle-in-chain), or EOC
(end-of-chain) to denote their position in the chain. An RU that is the only one in a chain is marked OIC (only-in-chain).
For some logical unit types, the application program can control the chaining of outbound data. You can chain the outbound data by including the CNOTCOMPL
(chain-not-complete) option on EXEC CICS SEND commands. This indicates the continuation of the chain. Excluding the CNOTCOMPL option on the last RU completes the chain. In general, the CNOTCOMPL option should not be used.
Once an output request with CNOTCOMPL specified has been made, subsequent output requests may not use the LAST option until the beginning of the next chain
(that is, the first output request following an output request in which
CNOTCOMPL is omitted).
Chapter 14. Terminal control
171
Response protocol
The two types of response that CICS can request for outbound data for an application program are: v
Definite response v
Exception response
“Definite response” means a response, even if an error does not occur. The
“exception response” means a response only if an error occurs.
If exception response protocol is used, an exception response may not be received and handled immediately after it arises.
CICS/400 does not allow specification of which response is required; OS/400 controls the type of response used. Remote terminal-owning systems, used with transaction routing, may allow the system programmer to specify which response type is required.
The use of definite response protocol has some performance disadvantages, but may be necessary for some application programs. The DEFRESP option on the
EXEC CICS SEND command provides a more flexible method of specifying the protocol to be used. One example of the use of this option is to request a definite response for every tenth output command, with exception response being the general rule.
Because a definite response can be requested only on the last element in the chain, the DEFRESP and CNOTCOMPL options are mutually exclusive.
Preventing interruptions (bracket protocol)
Bracket protocol prevents the interruption of a transaction between CICS and a logical unit. Generally, a bracket can be initiated by CICS or by the logical unit, and ended only by CICS unless it is for an APPC (LU6.2) logical unit, in which case the logical unit can end it. A bracket can also delimit conversation between
CICS and the logical unit or merely the transmission of a series of data chains in one direction.
Bracket protocol is used when CICS communicates with specific logical units. The use of brackets is not usually apparent to the application program.
Only on the last output request of a task to a logical unit does the bracket protocol become apparent to the application program. On the last output request to a logical unit, the application program may specify the LAST option on the EXEC
CICS SEND command. The last output request is defined as either the last EXEC
CICS SEND command specified for a task without chain control; or as the output request that transmits the FIC or OIC marker of the last chain of a transaction with chain control.
The LAST option causes CICS to transmit an end-bracket indicator with the final output message to the logical unit. This indicator notifies the logical unit that the current transaction is ending. If the LAST option is not specified, CICS waits until the task detaches before sending the end-bracket indicator. Because an end-bracket indicator is transmitted only with the first RU of a chain, the LAST option is ignored for a transaction with chain control unless FIC or OIC is also specified.
172
CICS for iSeries Application Programming Guide V5