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

Running data through a socket to CICS

I am attempting to pass data from my Windows 2000 C program through a socket to CICS. I have configured CICS TCP/IP and have the IBM supplied listener on socket 3002. The listener receives the incoming request from 3002 socket and kicks off my CICS transaction.

My transaction executes a retrieve successfully then attempts to issue a takesocket. That command completes with a return code (error) of 113. The IBM manual states that this message for a takesocket command is..."the socket has already been taken, correct the socket descriptor."

I have double-checked all my parameters and I cannot determine why I am getting this message. The retrieve command returns a value of "1" in the "give-take-socket" field which is not the socket that I am attempting to use. I am rather confused regarding this error.

It's somewhat difficult to deduce what is going on, but here is an appreciation that will probably be inaccurate.

If you have succeeded in reading some data from the socket, you must have got control of it in the current CICS transaction. That being so, then you do not need to issue a takesocket() because you have already got it. Or, the Listener has received the initial flow and done the XC START but not done the givesocket() call.

I suggest you turn on tracing and see what exactly is going on as regards the disposition of the socket.

Robert Harris
CICS Technical Strategist -- CICS expert at Search390.com

Editor's note: Do you agree with this expert's response? If you have more to share, post it in one of our .VO7aaqqaAFk.0@/search390>discussion forums.

Dig Deeper on IBM system z and mainframe systems

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.