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


Using OPEN to Prepare a Data Set for Processing

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

Use the OPEN macro to complete a DCB for a data set, and to supply the specifications needed for I/O operations. Therefore, the appropriate data can be provided when your job is run rather than when you write your program (see Figure 1).

When the OPEN macro is run, the OPEN routine:
  • Completes the DCB
  • Stores appropriate access method routine addresses in the DCB
  • Initializes data sets by reading or writing labels and control information
  • Builds the necessary system control blocks

The operating system stores information from a DD statement or dynamic allocation in the job file control block (JFCB). The open function uses the JFCB.

The DCB is filled in with information from the DCB macro, the JFCB, or an existing data set label. If more than one source specifies information for a particular field, only one source is used. A DD statement takes priority over a data set label, and a DCB macro over both.

You can change most DCB fields either before the data set is opened or when the operating system returns control to your program (at the DCB OPEN user exit). Some fields can be changed during processing. Do not try to change a DCB field, such as data set organization, from one that permitted the data set to be allocated to a system-managed volume, to one that makes the data set ineligible to be system-managed. For example, do not specify a data set organization in the DD statement as physical sequential and, after the data set has been allocated to a system-managed volume, try to open the data set with a DCB that specifies the data set as physical sequential unmovable. The types of data sets that cannot be system-managed are listed in Using the Storage Management Subsystem.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014