z/OS DFSMSdfp Advanced Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Closing the Data Set

z/OS DFSMSdfp Advanced Services
SC23-6861-01

The CLOSE macro instruction restores one or more DCBs so that processing of their associated data sets can be terminated. Issue CLOSE for all DCBs that were used by your channel programs. Some of the procedures performed when CLOSE is executed are:
  • Releasing data extent block
  • Removing information transferred to DCB fields when OPEN was executed
  • Verifying or creating standard labels
  • Volume disposition
  • Releasing programmer-written appendage routines
  • Uncapture UCB if the actual UCB is above the line and the allocation was done without the nocapture option and LOC=ANY in the DCBE macro was not specified.

When CLOSE is issued for a data set on a magnetic tape volume, the system processes labels according to bit settings in the DCBOFLGS field of the DCB. Before issuing CLOSE for magnetic tape, set the appropriate bits in DCBOFLGS. The significant DCBOFLGS bit positions are listed in the EOV macro instruction description.

When CLOSE is issued for a data set open for output on a direct access device, the system will try to write a file mark if fields are as described in Device-Dependent Parameters.

The parameters and different forms of the CLOSE macro instruction are described in z/OS DFSMS Macro Instructions for Data Sets.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014