Problem solve Get help with specific problems with your technologies, process and projects.

Is it possible to send a query from CICS region to Web server using TCP/IP sockets?

We are running TS 1.3 and would like to know if it is possible to send a query from our CICS region out to a Web server (HTTP 1.1) using TCPIP sockets. At first we thought that the CICS Web Interface would be our solution but later found out that was an inbound to CICS only process.
This is doable from within CICS, but the XC API does not support any TCP/IP functions. This sort of IP function is provided by MVS, and you can use the MVS TCP/IP interfaces to send an outbound flow from CICS to anywhere else.

One does: socket() ; bind() & connect() to establish the connection with the partner and then send() & recv() calls to do the communication and finally a close() to sterminate the connection.

However, beware of waiting for a return flow - if you do this incorrectly you can wait all of CICS! You must also consider how the UnitOfWork concept will apply in your application: in general, there will not be any connection between recoverable activity within CICS and that within the partner. If you need to get proper coordination going, then you are going to have to use XA protocols and get the MVS recovery manager involved: this will be tricky.

Have a look at 'SC31-7131 TCP/IP V3R2 for MVS: CICS TCP/IP Socket Interface Guide' which is uptodate enough to give you an idea of how to proceed: but beware, it describes things in C - don't be put off by this, later chapters talk about how to use the functions in a 'proper' language.

Dig Deeper on IBM system z and mainframe systems

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.