Understanding CICS Events
A CICS Event is the processing defined on a particular
message received from CICS. A CICS program sends a message to communicate
that a specific event occurs, for example, when an inventory level
crosses a threshold. In the most common use case, an EBCDIC COBOL
Copybook formatted record is received, converted to an XML document, and
delivered to a queue or program.
All processing details for a message are configured under a channel,
which include:
- Communications
parameters with CICS, for example, TCP port
- Message layouts
defined in COBOL Copybooks
- Assigned ports to
which the message is routed as an XML document
A CICS Event can be configured as REQUEST only, in which the
Event consumes a message, or REQUEST/RESPONSE, in which the Event
consumes a message and returns a reply message.
The following diagrams and sequences illustrate REQUEST and REQUEST/RESPONSE scenarios:
REQUEST
The following sequence outlines how request messages are processed.
- A message is
created by a CICS user program.
- The message
is sent via TCP to a channel (TCP port).
- The channel
receives the message.
- If the channel
is configured to work with Copybook formatted messages, it converts the
message to XML.
- The channel
routes the message to one or more destination ports for further processing,
for example, to a JMS queue.
REQUEST/RESPONSE
The following sequence outlines how request/response messages
are processed.
- A message is
created by a CICS user program.
- The message
is sent via TCP to a channel (TCP port).
- The channel
receives the message.
- If the channel
is configured to work with Copybook formatted messages, it converts the
message to XML.
- The channel
routes a message to a destination port for further processing, for example,
an HTTP request.
- The port takes
an XML document as input and returns an XML document as output to
the channel. For channels configured with COBOL Copybook formatted
messages, these documents conform to the XML schemas generated from
these Copybooks using iWay Explorer.
- If the channel
is configured to work with Copybook formatted messages, it converts the
XML into Copybook format.
- The channel
returns the reply message to the CICS program.
x
A message can be a Copybook formatted record or an XML
document.
Copybook formatted messages have the following properties:
- The request
message must be prefixed by a 4-byte message length.
- The Reply messages
(if returned) will be prefixed by 4-byte message length.
- Messages correspond
to Copybooks configured as a PreParser and PreEmitter on the channel.
XML formatted messages have the following properties:
- Request and
Reply messages (when returned) are XML documents, conforming to
the input and output document types of the backend process.
The following sample event programs are included with the product:
- iwayevt0
- COBOL, copybook described data, request only
- iwayevt1 -
C, XML, request/response
- iwayevt2 -
COBOL, copybook described data, request/response
For more information, see Sample Programs.
x
CICS Event handling is supported under Servlet iBSP.
iWay Service Manager (iSM) does not support CICS Events. However,
similar event handling capabilities can be achieved by configuring
a CICS PreParser and PreEmitter. For more information, see the iWay
Service Manager User’s Guide.