Reading tape files backward
You can also specify that an input file
on magnetic tape be processed backward by using the RDBACK parameter.
The RDBACK option is supported for:
- QSAM tape files
- Records formats of F, FB, and U
- All types of label processing
- Single volume magnetic tape files.
The following table describes the tape positioning for files that are opened and closed for RDBACK.
Macro | Specifies LEAVE on the OPEN or CLOSE Macro | FILEDEF TAPn Options | Tape positioning |
---|---|---|---|
OPEN | Yes | SL|SUL|AL|AUL|NSL option | Assumed position is immediately after the tape mark that ends the trailer label group. |
OPEN | Yes | LABOFF|BLP|no label processing option | Assumed position is immediately after the tape mark that ends the data. |
OPEN | Yes | No label processing option | The tape is rewound. |
OPEN | No1 | All except LABOFF | The tape is rewound. |
OPEN | No1 | LABOFF | Assumed position is immediately after the tape mark that ends the data. |
CLOSE | Yes | SL|SUL|AL|AUL|NSL option | The tape is left immediately before the header label group. |
CLOSE | Yes | LABOFF, BLP, NL, no label processing option | The tape is left immediately before the first data block of the file. |
CLOSE | No2 | The tape is always rewound. |
For more information on the RDBACK option, see the DFSMS Macro Instruction for Data Sets.
1 If neither LEAVE nor any other positioning option
is specified on the OPEN macro, then positioning depends on the FILEDEF
options. If you specify the LEAVE option on the FILEDEF command, positioning
is as if you specified OPEN LEAVE.
2 If neither LEAVE nor any other positioning option
is specified on the CLOSE macro, then the positioning option is taken
from the FILEDEF DISP PASS or KEEP parameter, if any was specified.
CLOSE with no options and FILEDEF with the DISP and PASS options behaves
like CLOSE LEAVE.