Supplying your own message handlers

When you want to perform specialized processing on the messages that flow between a service requester and a service provider, and CICS® does not supply a message handler that meets your needs, you will need to supply your own.

In most situations, you can perform all the processing you need with the CICS-supplied message handlers. For example, you can use the SOAP 1.1 and 1.2 message handlers which CICS supplies to process SOAP messages. But there are occasions when you will want to perform your own, specialized, operations on Web service requests and responses. To do this, you must supply your own message handlers.
  1. Write your message handler program. A message handler is a CICS program with a channel interface. You can write your program in any of the languages which CICS supports, and use any CICS command in the DPL subset within your program.
  2. Start of changeCompile and link-edit your program. Message handler programs normally run under transaction CPIH, which is defined with the attribute TASKDATALOC(ANY). Therefore, when you link-edit the program, you must specify the AMODE(31) option.End of change
  3. Install the program in your CICS system in the usual way.
  4. Define the program in the pipeline configuration file. Use the <handler> element to define your message handler. Within the <handler> element, code a <program> element containing the name of the program.