In some occasions it is necessary to take TCP/IP packet traces to diagnose connection problems between Spool and TCP/IP connected printers.
Spool 14.0
You must first add an external writer proc to a system library known to JES2.
//CTTCP JOB (901000000),CTTCP
//*
//* DOC: THIS PROCEDURE IS THE IPCS CTRACE EXTERNAL WRITER PROCEDURE
//* USED BY TCP/IP DATA TRACING
//*
//IEFPROC EXEC PGM=ITTTRCWR
//TRCOUT01 DD DSNAME=PUBLIC.TCPIP&SYS..TRACE,
// STORCLAS=IPCSDUMP,
// SPACE=(4096,(8192,500),,CONTIG),DISP=(NEW,CATLG),DSORG=PS
//SYSPRINT DD SYSOUT=*
Then enter the following console commands:
V TCPIP,,PKT,ON,FULL,IP=xxx.xxx.xxx.xxx Specify the IP address of the
printer to be traced in the IP
parameter.
V TCPIP,,PKT,ON
TRACE CT,WTRSTART=PTTCP,WRAP If you named your external writer something
different than the default adjust the WTRSTART
parameter.
TRACE CT,ON,COMP=SYSTCPDA,SUB=(TCPIPxx) where TCPIPxx is your TCP/IP STC
name.
At this point the external writer you added previously will be running and
will issue a WTOR. Reply with the following:
R xxx,WTR=PTTCP,END Again, if you chose a different name for your writer,
adjust the WTR parameter.
Then recreate the problem. After the problem has occurred enter the
following:
TRACE CT,ON,COMP=SYSTCPDA,SUB=(TCPIPxx) Again, specify your TCP/IP STC
name in the SUB parameter.
A new WTOR will be issued by the external writer. Your response is:
R xxx,WTR=DISCONNECT,END
Then enter these last two console commands to turn off the trace.
TRACE CT,WTRSTOP=PTTCP <== Adjust for external writer name, if necessary.
V TCPIP,,PKT,OFF
The output dataset allocated in your external writer will now contain the
packet trace. You can forward the raw trace data or use IPCS to analyze
the trace using the command CTRACE COMP(SYSTCPDA) SUB((TCPIPxx)) LOCAL FULL.