z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Factors to Consider When Opening and Closing Data Sets

z/OS DFSMS Using Data Sets
SC23-6855-00

Consider the following factors when opening and closing data sets:

  • Two or more DCBs can be open concurrently for output to the same PDSE.
    Two or more DCBs should never be concurrently open for output to the same data set, except in the following situations:
    • using PDSEs.
    • using specially written BSAM, BDAM, or EXCP programs with sequential data sets.
  • For all data sets except for PDSEs, if, concurrently, one DCB is open for input or update, and one for output to the same data set on direct access storage devices, the input or update DCB might be unable to read what the output DCB wrote if the output DCB extended the data set. For PDSEs, the system dynamically determines that the data set has been extended.
  • When an extended format data set is opened for reading, OPEN determines the number of blocks in the data set as of the previous CLOSE for writing. Any data added after the open for reading will not be found unless you supply a DCBE with PASTEOD=YES for the reading DCB. It should be set before reading. For QSAM you must set PASTEOD=YES before completion of the DCB OPEN exit routine to ensure that the system recognizes it.
  • If you want to use the same DD statement for two or more DCBs, you cannot specify parameters for fields in the first DCB, then obtain the default parameters for the same fields in any other DCB using the same DD statement. This is true for both input and output, and is especially important when you are using more than one access method. Any action on one DCB that alters the JFCB affects the other DCBs and thus can cause unpredictable results. Therefore, unless the parameters of all DCBs using one DD statement are the same, you should use separate DD statements.
  • Associated data sets for the IBM 3525 Card Punch can be opened in any order, but all data sets must be opened before any processing can begin. Associated data sets can be closed in any order, but, after a data set has been closed, I/O operations cannot be performed on any of the associated data sets.
  • The OPEN macro gets user control blocks and user storage in the protection key in which the OPEN macro is issued. Therefore, any task that processes the DCB (such as Open, Close, or EOV) must be in the same protection key.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014