Correlating the data trace and packet trace with the SOCKAPI trace
The SOCKAPI option only records the first 96 bytes of data. To see all the data that was sent or received, you must also activate the data trace or packet trace. The data trace can be correlated easily with the SOCKAPI trace option because both traces are recording data between the application and the TCP/IP stack. The traces can be merged with the IPCS MERGE subcommand. The data trace header contains fields that allow the full data to be correlated.
Figure 1 shows the data trace record corresponding to the READ Exit SOCKAPI trace entry in Figure 2. The server issues READ and waits for a message. The data trace record shows the entire 120 bytes of data because the FULL option was used when starting the data trace. In the READ Exit record, only the first 96 bytes of data are shown.
- Time
- The data trace time must be prior to the READ Exit record time. The data trace time is 20:08:09.181239. The READ Exit record time is 20:08:09.181354.
- Jobname
- The job name is EZASOKAS in both records.
- ASID
- The ASID is the server's 0024 (hexadecimal) in both records.
- TCB
- The TCB is 006E6A68 in both records.
- Data length
- In the data trace, the length is 78 hexadecimal, which is 120 decimal. The SOCKAPI trace record shows that the return code is 120 (decimal) bytes.
- Port
- The source port number in the data trace record (11007 decimal) matches the local port number in the SOCKAPI trace record. The destination and remote ports also match (1040 decimal).
- IP Address
- The IP addresses are handled in the same way as the port numbers. In this example, both the client and server were on the same TCP/IP stack, so the IP addresses are the same.
MVS026 DATA 00000003 20:08:09.181239 Data Trace
JOBNAME = EZASOKAS FROM FULL
TOD CLOCK = XB395B2C2 40035C03
PKT 2 LOST RECORDS = 0 HDR SEQUENCE NUM = 1
SOURCE IP ADDR = 9.67.113.58 DEST IP ADDR = 9.67.113.58
SOURCE PORT = 11007 DEST PORT = 1040 ASID = X0024 TCB = X006E6A68
DATA LENGTH = X0078
0000 E38889A2 4089A240 8140A2A3 99899587 *This is a string|....@..@.@......*
0010 40A689A3 88408696 99A3A840 83888199 * with forty char|@....@.....@....*
0020 8183A385 99A24B40 E38889A2 4089A240 *acters. This is |......K@....@..@*
0030 8140A2A3 99899587 40A689A3 88408696 *a string with fo|.@......@....@..*
0040 99A3A840 83888199 8183A385 99A24B40 *rty characters. |...@..........K@*
0050 E38889A2 4089A240 8140A2A3 99899587 *This is a string|....@..@.@......*
0060 40A689A3 88408696 99A3A840 83888199 * with forty char|@....@.....@....*
0070 8183A385 99A24B40 *acters. |......K@ *
====================================================================00002403
MVS026 SOCKAPI 60050043 20:08:09.181354 READ Exit
HASID....0024 PASID....0024 SASID..0024 JOBNAME..EZASOKAS
TCB......006E6A68 TIE......00006DF8 PLIST..00006E0C DUCB.....00000009 KEY..8
ADSNAME..EZASOKAS SUBTASK..EZASOKAS TOKEN....7F6F3798 09902FB0
LOCAL PORT..11007 IPADDR ..9.67.113.58
REMOTE PORT..1040 IPADDR ..9.67.113.58
REQAREA..: 00006D90x Addr..00006D90
SOCKET...: 1 Addr..00006B94
NBYTE....: 120 Addr..00006B90
BUF......: Addr..00006B96
+0000 E38889A2 4089A240 8140A2A3 99899587 | This is a string |
+0010 40A689A3 88408696 99A3A840 83888199 | with forty char |
+0020 8183A385 99A24B40 E38889A2 4089A240 | acters. This is |
+0030 8140A2A3 99899587 40A689A3 88408696 | a string with fo |
+0040 99A3A840 83888199 8183A385 99A24B40 | rty characters. |
+0050 E38889A2 4089A240 8140A2A3 99899587 | This is a string |
RETCODE..: 120 BYTES TRANSFERRED Addr..00006EB4
====================================================================00002407
The packet trace, on the other hand, does not correlate well with the SOCKAPI trace option. The packet trace records data being sent or received between the TCP/IP stack and the network. The packet trace data has headers and the data can be segmented or packed.