When the system passes control to a USRn formatting routine, the
output registers contain the following values:
- Register
- Contents
- 0
- Used as a work register by the system
- 1
- Address of a parameter list
- 2-12
- Used as work registers by the system
- 13
- Address of save area
- 14
- Return address
- 15
- Address of entry point
The parameter list
addressed by register
1 contains:
- Address of a token. The print buffer service
routine passes the token each time the formatting routine calls it.
- Address of the trace output buffer. IHATROB
maps the trace output buffer which is initialized with
the status information and, if the TTE is a multi-part entry, with
continuation information in TROBUNQ1, which corresponds to the UNIQUE-1
column of the formatted output line.
- Address of the USRn TTE.
- Address of a 512-byte work area. The USRn
formatting routines must be reentrant. The work area received as the
fourth parameter allows this. Your formatting routine may use the
512 bytes for any purpose; IBM® recommends
that it be used as an automatic data area. The same work area is passed
to each USRn formatting routine; it is not cleared between calls.
It is, however, initialized to zeroes before the first call to a
USRn routine.
- Address of a byte containing the subpool number to
be used for additional work space. If your USRn routine needs more
than 512 bytes for its processing, it can obtain more storage through
the GETMAIN macro. The fifth parameter is the subpool that must be
used for this GETMAIN request.
Note: If your routine does issue a GETMAIN, be sure that
it also issues a FREEMAIN for that storage. If it does not free the
storage reserved for its use when it is running on behalf of a SNAP
dump request, the storage it reserves will remain allocated and unavailable
for the life of the job.