TAPECLOSE= System Option: z/OS

Specifies how sequential access bound libraries on tape are handled when SAS closes the library data set.
Valid in: Configuration file, SAS invocation, OPTIONS statement, SAS System Options window
Category: File Control: SASFILES
PROC OPTIONS GROUP= SASFILES
Default: REREAD
z/OS specifics: Default value, valid values

Syntax

TAPECLOSE=REREAD | LEAVE | REWIND | DISP | FREE

Required Arguments

REREAD
specifies that the operating system rewind the tape volume to the start of the SAS library when SAS closes the library data set. Specifying TAPECLOSE=REREAD is recommended if the library is to be processed by multiple SAS procedures or DATA steps in the same SAS session.
LEAVE
specifies that the operating system leave the tape volume positioned immediately following the end of the data set on the current volume when SAS closes the library data set. Specifying TAPECLOSE=LEAVE is recommended if the subsequent data set on the tape volume is the next data set from that volume that SAS processes. For more information about the LEAVE parameter, see the example in Optimizing Performance.
REWIND
specifies that the operating system rewind the tape volume to the beginning of the tape when SAS closes the library data set.
DISP
specifies that the operating system position the tape volume in accordance with the termination disposition specified via the DISP parameter when the library data set was allocated. If the disposition is PASS, the action described for TAPECLOSE=LEAVE is performed. For other dispositions, the action described for TAPECLOSE=REWIND is performed, and in some cases, the tape volume can be unloaded if necessary.
FREE
specifies that the operating system deallocate the tape volume when SAS closes the library data set. Specifying this option makes the tape volume available for use by other jobs in the system as soon as SAS has closed the library, rather than at the end of the SAS session. Do not specify TAPECLOSE=FREE if the library data set is used in multiple SAS procedures or DATA steps in the same SAS session.

Details

In general, SAS closes the library data set at the conclusion of the SAS procedure or DATA step that is processing the library. The TAPECLOSE option has no effect on processing direct bound libraries or UFS libraries. Specifying FREE=CLOSE on the JCL DD statement for a library is honored only if TAPECLOSE has a value of REWIND, DISP, or FREE. If TAPECLOSE has a value of REREAD or LEAVE, then the FREE=CLOSE specification is ignored. For more information about FREE=CLOSE, see the IBM JCL Reference for the version of z/OS that your site is using.
Note: If the FILECLOSE data set option is specified, then it overrides the TAPECLOSE system option.