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

Writing a CICS Sockets listener that receives records and sends acknowledgements

I am trying to write a CICS Sockets listener that will also receive records and send an acknowledgement. I'm trying to do the function inside the listener. I've seen a few iterative server samples and concurrent server samples but I can't decide which is best. I think a concurrent server is best. It will only start one child transaction that will perform the work of reading and sending the ack/nak.

Do you have any suggestions or sample working programs that may help me? I work for Harris County Hospital District and we are attempting to install eGATE and have it communicate to the host via CICS Sockets. Any help will be greatly appreciated. Thanks!

The main thing to understand about CICS programming of inbound TCP/IP flows is that it does not involve any XC Commands! We use the MVS supplied function to do all processing associated with IP activity: The getting of the socket, the reception of the flow and the sending of the reply all occur via MVS interfaces. However, as you are talking about Iterative/Concurrent Servers, I guess you already know that!

If you only ever want to do a single IP-initiated process within CICS, then an Iterative server will be satisfactory. However, I'm not too keen on this arrangement for performance and integrity reasons. Thus, you are correct to go with a Concurrent Server. As long as you get the Listener Task to XC START the Server task (it passes the socket number in Startdata) which then does the takeSocket you should be able to run the application as if it were a 'normal' CICS-initiated item.

Don't forget that you can also do lots of interesting load-balancing/failover things if you get the MVS WorkLoadManager involved.

As in all this type of activity, the programming challenge is where the UnitOfWork boundary occurs, and how one recovers from data not received by the invoker of the CICS function or if this is subsequently rejected: I'd recommend thinking about this conversational protocol sooner rather than later. You will probably end up implementing something like a sort of LU6.2 SL(1) arrangement whereby all flows are acknowledged before proceeding further.

In the TCP/IP product files, programming samples are in SEZAINST : EZACICSS is the Listener program (which also initializes things) and EZACICSC is the listener (which is the one you will recode for your application).

You DO NOT define the interface via a RDO TCPIPSERVICE for this reason. The z/OS documentation is in "z/OS Communications Server IP CICS Sockets guide: SC31-8807".

There is a rather old red book "IBM TCP/IP V3R1 for MVS Implementation Guide: GC24-3687" which describes how to program IP activity within CICS - but it's still valid.

It might also be an idea to have a look at the Guide or Share Websites for experiences.

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.