Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Open/Close/EOV Standard User Label Exit z/OS DFSMS Using Data Sets SC23-6855-00 |
||||||||||||||||||||||||||||
When you create a data set with physical sequential or direct organization, you can provide routines to create your own data set labels to augment the system's labels. You can also provide routines to verify these labels when you use the data set as input. Each label is 80 characters long, with the first four characters UHL1,UHL2, through UHL8 for a header label or UTL1,UTL2,...,UTL8 for a trailer label. User labels are not permitted on partitioned, indexed sequential, spooled, or extended format data sets or HFS data sets. The physical location of the labels on the data set depends on the data set organization. For direct (BDAM) data sets, user labels are placed on a separate user label track in the first volume. User label exits are taken only during execution of the OPEN and CLOSE routines. Thus you can create or examine as many as eight user header labels only during execution of OPEN and as many as eight trailer labels only during execution of CLOSE. Because the trailer labels are on the same track as the header labels, the first volume of the data set must be mounted when the data set is closed. For physical sequential (BSAM or QSAM) data sets on DASD or tape with IBM standard labels, you can create or examine as many as eight header labels and eight trailer labels on each volume of the data set. For ISO/ANSI tape label data sets, you can create an unlimited number of user header and trailer labels. The user label exits are taken during OPEN, CLOSE, and EOV processing. To create or verify labels, you must specify the addresses of your label exit routines in an exit list as shown in Table 1. Thus you can have separate routines for creating or verifying header and trailer label groups. Care must be taken if a magnetic tape is read backward, because the trailer label group is processed as header labels and the header label group is processed as trailer labels. When your routine receives control, the contents of register 0 are unpredictable. Register 1 contains the address of a parameter list. The contents of registers 2 to 13 are the same as when the macro instruction was issued. However, if your program does not issue the CLOSE macro, or abnormally ends before issuing CLOSE, the CLOSE macro will be issued by the control program, with control-program information in these registers. The parameter list pointed to by register 1 is a 16 byte area aligned
on a fullword boundary. Figure 1 shows the contents of
the area:
Figure 1. Parameter
List Passed to User Label Exit Routine
The first address in the parameter list points to an 80-byte label
buffer area. The format of a user label is described in User Label Groups. For input, the control program reads a user label
into this area before passing control to the label routine. For output,
your user label exit routine builds labels in this area and returns
to the control program, which writes the label. When an input trailer
label routine receives control, the EOF flag (high-order byte of the
second word in the parameter list) is set as follows:
When a user label exit routine receives control after an uncorrectable
I/O error has occurred, the third word of the parameter list contains
the address of the standard status indicators. The error flag (high-order
byte of the third word in the parameter list) is set as follows:
The fourth entry in the parameter list is the address of the user totaling image area. This image area is the entry in the user totaling save area that corresponds to the last record physically written on the volume. (The image area is discussed in User Totaling for BSAM and QSAM.) Each routine must create or verify one label of a header or trailer label group, place a return code in register 15, and return control to the operating system. The operating system responds to the return code as shown in Table 1. You can create user labels only for data sets on magnetic tape volumes with IBM standard labels or ISO/ANSI labels and for data sets on direct access volumes. When you specify both user labels and IBM standard labels in a DD statement by specifying LABEL=(,SUL) and there is an active entry in the exit list, a label exit is always taken. Thus, a label exit is taken even when an input data set does not contain user labels, or when no user label track has been allocated for writing labels on a direct access volume. In either case, the appropriate exit routine is entered with the buffer area address parameter set to 0. On return from the exit routine, normal processing is resumed; no return code is necessary.
Label exits are not taken for system output (SYSOUT) data sets,
or for data sets on volumes that do not have standard labels. For
other data sets, exits are taken as follows:
To process records in reverse order, a data set on magnetic tape can be read backward. When you read backward, header label exits are taken to process trailer labels, and trailer label exits are taken to process header labels. The system presents labels from a label group in ascending order by label number, which is the order in which the labels were created. If necessary, an exit routine can determine label type (UHL or UTL) and number by examining the first four characters of each label. Tapes with IBM standard labels and direct access devices can have as many as eight user labels. Tapes with ISO/ANSI labels can have an unlimited number of user labels. After an input error, the exit routine must return control with an appropriate return code (0 or 4). No return code is required after an output error. If an output error occurs while the system is opening a data set, the data set is not opened (DCB is flagged) and control is returned to your program. If an output error occurs at any other time, the system attempts to resume normal processing. |
Copyright IBM Corporation 1990, 2014
|