IBM OS/390 User Manual

Page of 673
Note:
You can specify any number of dcbaddresses and associated options in
the OPEN macro instruction.
CLOSE Macro
 1. Options
REREAD
LEAVE
REWIND
DISP
 2. If you omit the option, the following positioning occurs:
If TYPE=T is coded, LEAVE is assumed (BSAM only).
If TYPE=T is not coded, DISP Is assumed (BSAM only).
 3. You can code CLOSE with T Y P E = T to temporarily close sequential data sets
on magnetic tape volumes processed with BSAM. When you use TYPE=T,
the DCB used to process the data set maintains its open status, and you
don
t have to issue another OPEN macro to continue processing the same
data set. A request to temporarily close a data set causes MVS to process
labels, modify some of the fields in the system control blocks for that data
set, and reposition the volume (or current volume in the case of multivolume
data sets) in much the same way that the normal CLOSE macro does. When
you code TYPE=T, you can specify that the volume either be positioned at
the end of data (the LEAVE option) or be repositioned at the beginning of
data (the REREAD option). Magnetic tape volumes are repositioned either
immediately before the first data record or immediately after the last data
record; the presence of tape labels has no effect on repositioning. When a
DCB is shared among multiple tasks, the task that opened the data set must
also close it; however, a subtask of the task that opened the DCB can issue
the CLOSE macro with the TYPE=T option.
 4. When using QSAM, close all output data sets before ending the program to
ensure that all records have been written.
CNTRL Macro
VSE
CLOSE(R)
filename
,...
(r1)
MVS
CLOSE
dcbaddress
,option ,... ,TYPE=T
 (2-12)
VSE
CNTRL
filename
,code
(1)
MVS
CNTRL
dcbaddress,code ,number of blocks
298
VSE to OS/390 Migration Workbook