I stumbled on this by accident.
In the TCPIP.DATA configuration file you can specify
TRACE SOCKET
I copied the configuration file, and made the change. I used it in my JCL
//SYSTCPD DD DISP=SHR,DSN=USER.Z24C.TCPPARMS(MYDATA)
Note if you use TRACE SOCKET in the configuration file used by every one – then every one will get their sockets traced – which may not be what you want.
The output to SYSPRINT is like
request = HCreate EZY3829I pre 0xe3e2d9c2 00c00001 00010000 00000020 e3c3d7c9 d7404040 00000000 00000000 EZY3830I 0x00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 EZY3831I 0x00000000 1fa77318 00000000 00000000 00000000 00000080 00000000 00000000 EZY3832I 0x00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 EZY3833I 0xffff0002 00000000 00000000 40404040 40404040 f18681f7 f68686f8 00000000 EZY3834I 0x00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 request = HCreate EZY3835I post 0xe3e2d9c2 00c00001 00010000 00000020 e3c3d7c9 d7404040 00000000 00000000 EZY3830I 0x7f5ec0f0 00010000 00000000 00000000 00000000 00000000 00000000 00000000 EZY3831I 0x00000000 1fa77318 00000000 00000000 00000000 00000080 00000000 00000000 EZY3832I 0x00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 EZY3833I 0xffff0002 00000031 00000000 40404040 40404040 f18681f7 f68686f8 00000000 EZY3834I 0x00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
These messages and the content are not documented – they are for IBM Software Support.