Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Using BSAM or EXCP for Random I/O to a Multivolume Data Set z/OS DFSMSdfp Advanced Services SC23-6861-01 |
|
If you open a BDAM DCB for a multivolume data set, OPEN links your program to all volumes simultaneously so that your program can ignore volume boundaries and treat all volumes of the data set as one entity. If you open a BSAM or EXCP DCB for a multivolume data set, OPEN gives your program access to only one volume at a time. This is true for both disk and tape. To switch to another volume, your program issues a CHECK or FEOV macro for BSAM or EOV macro for EXCP. To return to a previous volume, you must close and reopen the data set, which would be slow. Your program can use RDJFCB and OPEN TYPE=J with one DCB per volume to process all the volumes in parallel. Your program must keep track of which DCB is for each volume. Your program uses the RDJFCB macro to read in the JFCB, and uses OPEN with TYPE=J to open each volume of the data set. The coding example in Figure 1 illustrates the procedure with EXCP DCBs. This technique does not work for a JFCB disposition of NEW because OPEN TYPE=J honors modifications to the JFCB volume sequence number JFCBVLSQ only for tape and only if the JFCB file sequence is also modified. This technique does not work with a striped data set because OPEN always opens all volumes of a striped data set in parallel as for BDAM. If you are using BSAM to read non-striped volumes in parallel, you should avoid using the CHECK macro because it can automatically move to the next volume when you reach the end of the current volume. Use WAIT or EVENTS instead of CHECK. Refer to z/OS DFSMS Using Data Sets and z/OS DFSMS Macro Instructions for Data Sets for information about WAIT or EVENTS. If you optimize I/O with the MULTACC parameter of the DCBE macro, you also must issue TRUNC macros. With tape, you cannot open more than one DCB per allocated drive. You can calculate the number of allocated drives from the TIOT entry length or by issuing the IEFDDSRV macro. IEFDDSRV returns the number of devices in DVAR_NUM_DVENT. Refer to z/OS MVS Programming: Assembler Services Reference IAR-XCT. If your program does any of the following it will damage the data
set:
If the data set is newly allocated on DASD, space has been allocated only on the first volume unless you used the guaranteed space option of SMS. For both DASD and tape, if the data set has not yet been written on the volume, the OPEN fails. Figure 1. Processing a
Multivolume Data Set with EXCP
|
Copyright IBM Corporation 1990, 2014
|