Having received an unsolicited input, how does CICS® decide
what to do with it? That is, what transaction should the task created
to process it execute? The short answer is that the previous task
with the same principal facility usually tells CICS what transaction
to execute next just before it ends, by the TRANSID option on its
final RETURN. This is almost always the case in a pseudoconversational
transaction sequence, and usually in menu-driven applications as well.
Failing that, and in any case to get a sequence started, CICS interprets
the first few characters of the input as a transaction code. However,
it is more complicated than that; the exact process goes as follows.
The step numbers indicate the order in which the tests are made and
refer to Figure 35, a diagram of this logic.
Figure 35. Determining which transaction to execute
- 0.
- On the very first input from a terminal, CICS sometimes schedules
a preliminary task before creating one to process the input. This
task executes the CICS-supplied "query" transaction, CQRY, which
causes the terminal to transmit an encoded description of some of
its hardware characteristics--extended attributes, character
sets, and so on.
CQRY allows the system
programmer to simplify maintenance of the terminal network by omitting
these particulars from the terminal definitions. It occurs only if
the terminal definition so specifies, and has no effect on the subsequent
determination of what transaction to use to process the input, which
goes as follows.
- 1.
- If the terminal is a 3270 and the input is the "print request
key", the CICS-supplied transaction that prints the contents of
the screen, CSPP, is initiated. See CICS print key for more information about this feature.
For this purpose, a "3270 logical unit" or any other device that
accepts the 3270 data stream counts as a 3270.
- 2.
- If full BMS support is present, the terminal is of a type supported
by BMS terminal paging, and the input is a paging command, the CICS-supplied
transaction CSPG is initiated to process the request. BMS support
levels are explained in BMS support levels, and the same section
contains a list of the terminals that BMS supports. The PGRET, SKRxxxx,
PGCHAIN, PGCOPY, and PGPURGE options in the system initialization
table define the paging commands. As paging requires full BMS, this
step is skipped if the CICS system contains less than that level.
- 3.
- If the terminal definition indicates that a specific transaction
should be used to process all unsolicited inputs from that terminal,
the indicated transaction is executed. (If present, this information
appears in the TRANSACTION attribute of the TERMINAL definition.)
- 4.
- If the previous task at the terminal specified the TRANSID option
of the RETURN command that ended it, the transaction named is executed.
- 5.
- If an attach function management header is present in the input,
the attach names in the header are converted to a 4-character CICS
transaction identifier, and that transaction is executed.
- 6.
- If the terminal is a 3270, and the attention identifier is defined
as a transaction, that transaction is executed. Attention keys explains
attention identifiers. You define one as a transaction identifier
with the TASKREQ attribute of the corresponding TRANSACTION definition.
- 7.
- If all of the preceding tests fail, the initial characters of
the input are used to identify the transaction to be executed. The
characters used are the first ones (up to four) after any control
information in the data stream and before the first field separator
character or the next 3270 Control Character (X'00' to X'3F').
Field separators are defined in the FLDSEP option of the system initialization
table (the default is a blank).
If there are no such characters
in the input, as occurs when you use the CLEAR key, for example, or
if there is no transaction definition that matches the input, CICS
cannot determine what transaction to execute and sends an "invalid
transaction identification" message to the terminal.
Note:
This logic for deciding which transaction to execute
applies only to tasks initiated to process unsolicited inputs. For
automatic transaction initiation, the transaction is always known.
You specify it in the TRANSID option when you create a task with a
START or RETURN IMMEDIATE. Similarly, you specify what transaction
should be used to process a transient data queue in the queue definition.
Tasks created to route messages always execute the CICS-supplied transaction
CSPG.
[[ Contents Previous Page | Next Page Index ]]