CICS(Customer Information Control System), a transaction system that runs primarily on IBM mainframe.The CICS transport can be used to call mainframe programs by sending XML messages to Mule.Mainframe programs have fixed-length record layouts for input/output.
XML, on the other hand does not have length-restriction for an element's value.
The CICS transport provides transformers to transform messages between XML and fixed-length format.
The typical steps (inside Mule) to send XML messages to mainframe are as follows:
- XML messages are received by Mule from the client (e.g: a JMS queue).
- The mainframe operation to be invoked is detected from the XML message.
- The XML message is converted into a fixed-length mainframe format.
- The mainframe program is invoked via CICS.
- The fixed-length binary response is converted into XML.
- The XML response is sent back to the client (e.g: the JMS reply queue).
An example XML message received from a client is shown below:
<sample-command xmlns="http:>
<customer-info>
<customer-no></customer-no>
<customer-name>Jones</customer-name>
<customer-address>Boston</customer-address>
<date>20080401</date>
<customer-info>
</sample-command>
The XML is transformed into fixed-length format required by mainframe.
Fixed-length request message
< \+Jones \+Boston \+20080401>
| | | | |
| | | | |
-+cust-no+-\--customer-name \--\--+\--\-+-+customer-address+-\---------------\--\|--date-\-
Response fixed-length message
<00002+20080401+0000050001+Bill Jones +1024, Parker Road, Boston, USA
\+006000+0000060001+Matt Jones
\+101, Miller Road, Boston, USA \+001000+>
The fixed-length message is transformed into XML as shown below.
Response XML Message
<sample-response xmlns="http:>
<no-of-records>2</no-of-records>
<date>20080401</date>
<customer-list>
<customer-no>0000050001</customer-no>
<customer-name>Bill Jones</customer-name>
<customer-address>1024, Parker Road, Boston,USA</customer-address>
<customer-charge>6000</customer-charge>
</customer-list>
<customer-list>
<customer-no>0000060001</customer-no>
<customer-name>Matt Jones</customer-name>
<customer-address>101, Miller Road, Boston,USA</customer-address>
<customer-charge>1000</customer-charge>
</customer-list>
</sample-response>