gtpi1m5l | System Installation Support Reference |
UXTH contains 3 sets of label processing routines. The first, UHLSTART is used to write user header labels to an output tape. The second, UTLSTART is used to write user trailer labels to an output tape. The third, IHLSTART, is used to read user header labels from an input tape. Each of these routines calls the user label subroutines, which are user-modifiable.
The user header label routine calls subroutines UHL1, UHL2, ... UHL8 in order until all 8 are called or until any one of the subroutines fails to set up the user label properly. A valid user header label will start with the characters UHLx where x is the current label number. After verifying the label, UXTH writes the record. Should the write fail, control is passed to COSG and error message COTM161E is sent to your console.
The user trailer label routine calls subroutines UTL1, UTL2, ... UTL8 in order until all 8 are called, or until any one of the subroutines fails to set up the user label properly. A properly set up user trailer label will start with the characters UTLx where x is the current label number. After verifying the label, UXTH writes the record. Should the write fail, control is passed to COSG and error message COTM161E is sent to your console.
The user header label routine for input tapes starts by reading from the input tape. If a tape mark is found, return is made with an indicator saying no user labels were found. If an I/O error occurs, return is made with an error indicator set. If a data record is read, it is checked to make sure it is a properly set up user header label. If not, return is made indicating an invalid label record on the tape. If the record is a valid user header label, subroutine IHL1 is called to perform user processing on the label. This process repeats itself, calling IHL2, IHL3, and others each time a valid user header label is read. If a tape mark is found after reading at least one user header label, control is returned with an indicator saying that user header labels were found. If 8 valid user header labels are read in, and another record is read before finding a tape mark, control is returned with an invalid label indication.
The user label subroutines should not use any of the ECB fields. If temporary storage is needed, a portion of the user label work area, at label ULWAUSR, is set aside for this purpose.
UXTH is called by the following segments:
Input
On entry to UXTH, certain registers are set up to be used by the user label subroutines. These are:
When UXTH is called to write user header records, the TSTB/3 entry for the tape is not yet set up, therefore, R4 has a pointer to the TLMR record. This requires that the equates in TAPEQ be used to access any fields in the TLMR.
All of the calling program's registers are saved in ULWASAVE on entry. This data area should not be modified for any reason, although, user label subroutines can access these values to restore the pointers provided by the caller. The individual register values are saved in ULWASA0 through ULWASA15 corresponding to R0 through R15.
When the first user label subroutine gets control (UHL1, UTL1 or IHL1) registers R2, R4, R5, and R6 will be set up as listed previously. R3 will point to the base of the User Label Work Area (ULWA). It is recommended that this register not be changed. If it is necessary to use R3, however, the pointer to the ULWA can be restored from CE1CR3. When any other user label subroutines get control, register R3 will once again point to the base of the User Label Work Area. R0, R1, R2, R4, R5, and R6 will all contain whatever values they contained on exit from the previous user label subroutine.
Data Structures
DSECT ITUHL maps a 1005-byte work area that is used by UXTH. The work area is broken up into the following areas: