<SNIP>
I am trying to debug a TCP/IP server as a template I am using the following
flow chart from a document by Tony Thigpen
</SNIP>

It just occurred to me that your "hang" condition might be due to you
issuing a WAIT on the ECB after return from EZASMI TYPE=ACCEPT and R15
contained a non-zero value. Do not issue the WAIT because it will never be
posted because the TYPE=ACCEPT is not pending due to some other error. Only
issue the WAIT when R15 from the EZASMI macros (all of them) contains 0. 

Here is a sample of an EZASMI TYPE=ACCEPT call using the techniques I wrote
about earlier:

1.  Initialize ECB= area for a length of 104 bytes to binary zeros to be 
    Used by the TYPE=ACCEPT call
2.  Create a fresh copy of the EZASMI MF=L in your work area
3.  Issue the EZASMI TYPE=ACCEPT specifying the ECB= cleared above and the
    other parameters as documented including MF=(E,work area) from #3
4.  When control returns to your program from EZASMI, test R15 for a
    zero value. If non-zero DO NOT ISSUE WAIT, but branch 
    to your TCP/IP error routine where you will close the socket.
5.  Since R15 is zero, issue WAIT on the ECB= area 
6.  When the ECB is posted, clear the ECB to zeros 
7.  Test the RETCODE= area for negative. If negative, branch to your TCP/IP
    error routine where you will close the socket.
8.  Save the low-order halfword of the RETCODE as the socket you are 
    going to issue TYPE=GIVESOCKET against.
9.  Issue TYPE=GIVESOCKET specifying the socket number you saved just above.
10. Issue TYPE=CLOSE against this same socket.
11. Branch back to #1

I didn't talk about how you have to ATTACHX a subtask to take the socket,
but this task must issue TYPE=TAKESOCKET. TCP/IP will return a new socket
number to the subtask and this is the socket that all SEND/RECV macros must
use. The subtask closes this socket when done with it.

I hope this helps.

Andy Coburn               

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to