I searched the archives and found a very similar problem to mine in the thread
https://listserv.ua.edu/cgi-bin/wa?A2=ind0606&L=IBM-MAIN&P=R34295&I=-3&X=D02C315241E55CCC48&Y=abend922%40gmail.com&d=No+Match%3BMatch%3BMatches
back in 2006 and ably answered by Rob Scott. I seem to have a very similar
problem. I am trying to convert a very ancient C module which listens for
incoming connections and hands them off to a subtask in the same ASID. Now I
want to handover the socket to another ASID so, following the above thread and
the Sockets API manual, I changed the task name in the listener's client id to
the jobname of the worker ASID and set the subtask name to blanks. I have also
issued a getclientid() and set the task/subtask names in a system-wide
Name/Token pair. In the worker ASID, which is written in assembler, I have
picked up the N/T pair and inserted the value into a client id and issued
takesocket(). The socket number is communicated via the code in a cross-memory
post which wakes up the worker. Every time I get errno=113 (EBADF). I have
tried setting the subtask name in the givesocket() to that used in the worker's
INITAPI, but no difference. The client id from the listener looks like this:
TAU0200I 13:35:12.736 Socket 1 received from MFADEV
TAU0015I 13:39:06.296 Before call TAKESOCKET
Address Offset Word 1 Word 2 Word 3 Word 4 Word 5 Word 6
Word 7 Word 8 * Storage Content *
1EA41614 00000000 00000002 D4C6C1C4 C5E54040 00000081 7F4E7D00 00000000
00000000 00000000 *....MFADEV ...a"+'.............*
1EA41634 00000020 00000000 00000000
*......... *
TAU0065I 13:43:21.612 After Call TAKESOCKET RC : FFFFFFFF ERRNO :
00000071
The task name is the jobname but the subtask name is binary. Is this
acceptable? I tried zeroing it out but that didn’t help; setting it to blanks
produced errno=121 (illegal argument). I seem to be doing what's described in
the manual but it just won't work. Any pointers as to what I have missed?
TIA
Robin
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN