FEOV—Force end-of-volume (BSAM and QSAM)

The FEOV macro causes the system to assume an end-of-volume condition, and switches volumes automatically. You can specify volume positioning for magnetic tape with the REWIND or LEAVE option. If no option is coded, the positioning specified in the OPEN macro is used. Output labels are created as required and new input labels are verified. The standard exit routines are given control as specified in the data control block exit list. For BSAM, you must test all input and output operations for completion before issuing the FEOV macro. The end-of-data (EODAD) routine is given control if an input FEOV macro is issued for the last volume of an input data set and another data set is not concatenated.

If the current data set is part of a concatenation and you are on the last or only volume, the system switches to the next data set. If you are at the end of the last data set, the end-of-data routine is given control. If the EODAD routine is needed but you did not specify one, the FEOV issues ABEND 337-04.

FEOV is ignored if issued for a SYSIN or SYSOUT data set or if the data set is closed.

FEOV treats an UNIX file or a striped data set as a single volume data set which cannot be extended to additional volumes.

The FEOV macro may be issued in 24- or 31-bit addressing mode. When issued in 31-bit addressing mode, all addresses must be valid 31-bit addresses. If it causes entry to the end-of-data (EODAD) routine, the EODAD routine is entered in the addressing mode in which you issue FEOV.

During FEOV processing, if an error occurs that is ignored by the user's DCB ABEND exit, the DCB will be closed on return from FEOV. It is recommended that the DCB be checked to verify it is still open upon return from FEOV before issuing any other macro using that DCB other than CLOSE or FREEPOOL.

Recommendation: Issue an FEOV in 31-bit addressing mode when processing a DCB open for output that specifies QSAM locate mode and the buffers are above the 16MB line (DCBE RMODE31=BUFF is specified), .

The format of the FEOV macro is:

dcb address—RX-Type Address, (2-12), or (1)
specifies the address of the data control block for an opened sequential data set.
REWIND
requests that the system position the tape that you are leaving at the load point regardless of the direction of processing.
LEAVE
requests that the system position the tape at the logical end of the data set on the volume that you are leaving. This option positions the tape at a point after the tape mark that follows the trailer labels. Multiple tape units must be available to achieve this positioning. If only one tape unit is available, its volume is rewound and unloaded.
Restrictions are as follows:
  • If an FEOV macro is issued for a multivolume data set with spanned records that is being read using QSAM, errors might occur when the next GET macro is issued following an FEOV macro if the first segment on the new volume is not the first segment of a record. The errors include duplicate records, program checks in your user program, and invalid input from the variable spanned data set.
  • Do not use the FEOV macro in the error analysis routine (SYNAD).