In addition to coding the installation TID table, you need to do
the following:
- Code Exit 0. Exit 0 must:
- Obtain the $UCT and place the $UCTs address in the $HCT.
- Initialize the $UCT.
- Place the installation TID table address in the MCTTIDTU field
in the $MCT in module HASPTABS. This is not necessary for dynamic
tables. Dynamic tables should be linked to the table pair by placing
a LOAD initialization statement in your JES2 initialization stream
for the module containing the dynamic trace id table.
- Provide the format routine. The installation format routine cannot
itself issue a TRACE=YES on its $SAVE or $RETURN. The registers upon
entry to the format routine are as follows:
- Register 1 - points to the TTP for the trace table that contains
the entry as defined by the installation TIDTAB.
- Register 2 - points to the TTE that contains the data that the
installation $TRACE macro saved. This is the data to be formatted
by the TROUT255 format routine.
- Register 4 - points to the TIDTAB (Trace Id Table) element that
you created.
- Register 5 - points to an open area in an output area. The format
routine takes the data contained in the TTE, makes the data printable,
and places the resulting printable data into this output area, starting
at the location pointed to by R5. The field TLGBSAVE in the $TLGWORK
area (the variable extension area off of the event trace log PCE)
points to the beginning of this output area. The maximum size of this
output is defined by an equate in $HASPEQU named TRCLRECL. Therefore,
the maximum area that can be saved in this output area is TRCLRECL-1
(minus one for the carriage control). When the output area is full,
a call to a routine named TRCPUT can be made to ‘PUT’ this
line and obtain a new output area.
- Register 14 - contains the return address.
- Register 15 - contains the format routine entry address.
The TRCPUT service routine is an external routine available
to installation format routines to “PUT” a formatted output
area and obtain a new output area. You can access the TRCPUT service
through a $CALL TRCPUT call out of the HCT in the PADDR.
On
entry to the TRCPUT service routine, you must pass the length of the
text in Register 0. You can calculate this by taking the ending address
in the output area of the installation data and subtracting the value
in TLGBSAVE. Register 15 must contain the address of the TRCPUT service
routine and Register 14 must contain the return address (that is,
use standard BALR R14,R15 linkage).
On exit, the TRCPUT service
routine is returned in register 5 the address of the new output area.
The format routine must return to the caller of the installation format
routine. Therefore, the format routine must $STORE R5 upon return
from the TRCPUT service routine.