Rational Developer for System z
Enterprise PL/I for z/OS, Version 4.2, Programming Guide

LEAVE|REREAD

The magnetic tape handling options LEAVE and REREAD allow you to specify the action to be taken when the end of a magnetic tape volume is reached, or when a data set on a magnetic tape volume is closed. The LEAVE option prevents the tape from being rewound. The REREAD option rewinds the tape to allow reprocessing of the data set. If you do not specify either of these, the action at end-of-volume or on closing of a data set is controlled by the DISP parameter of the associated DD statement.

Read syntax diagramSkip visual syntax diagram>>-+-LEAVE--+--------------------------------------------------><
   '-REREAD-'
 

If a data set is first read or written forward and then read backward in the same program, specify the LEAVE option to prevent rewinding when the file is closed (or, with a multivolume data set, when volume switching occurs).

The effects of the LEAVE and REREAD options are summarized in Table 19.

Table 19. Effect of LEAVE and REREAD Options
ENVIRONMENT
option
DISP
parameter
Action
 
REREAD -- Positions the current volume to reprocess the data set.
LEAVE -- Positions the current volume at the logical end of the data set.
Neither
REREAD nor
LEAVE
PASS
 
 
DELETE
 
KEEP,
CATLG,
UNCATLG
Positions the volume at the
end of the data set.
 
Rewinds the current volume.
 
Rewinds and unloads the
current volume.
 

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)