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


OPEN - Initialize Data Control Block for Processing the JFCB

z/OS DFSMSdfp Advanced Services
SC23-6861-01

The OPEN macro instruction initializes one or more data control blocks (DCBs) so that their associated data sets can be processed.

A full explanation of the operands of the OPEN macro instruction is contained in the publication z/OS DFSMS Macro Instructions for Data Sets. The TYPE=J option, because it is used in conjunction with modifying a JFCB, should be used only by the system programmer or under the system programmer's supervision.

The format of the OPEN TYPE=J macro is:

Read syntax diagramSkip visual syntax diagram
>>-+-------+--OPEN---------------------------------------------->
   '-label-'         

>--+-(dcb_addr)-----------------------------+------------------><
   |   .-,------------------------------.   |   
   |   V                                |   |   
   +-(---dcb_addr-+-,-----------------+-+-)-+   
   |              +-,-| option1 |-----+     |   
   |              +-,(-| option1 |-)--+     |   
   |              '-,(,-| option2 |-)-'     |   
   '-,TYPE=J--------------------------------'   

option1

   .-INPUT--.   
|--+-EXTEND-+---------------------------------------------------|
   +-OUTPUT-+   
   +-INOUT--+   
   +-OUTIN--+   
   +-OUTINX-+   
   +-RDBACK-+   
   '-UPDAT--'   

option2

   .-DISP---.   
|--+-LEAVE--+---------------------------------------------------|
   +-REREAD-+   
   '-REWIND-'   

Tip: If you wish to have multiple DCBs with or without options, code each DCB (and options) as shown in the diagram and precede each additional DCB with a comma.
Figure 1. Examples of Standard Form of the OPEN TYPE=J Macro
OPEN (DCB1),TYPE=J
OPEN (DCB1,INPUT),TYPE=J
OPEN (DCB1,(INPUT)),TYPE=J
OPEN (DCB1,(INPUT,REREAD)),TYPE=J
OPEN (DCB1,,DCB2),TYPE=J
OPEN (DCB1,,DCB2,(INPUT,REREAD),DCB3,INPUT),TYPE=J
TYPE=J
Specifies that, for each DCB referred to, you have supplied a job file control block (JFCB) to be used during initialization. A JFCB is an internal representation of information in a DD statement.

During initialization of a data control block, its associated JFCB can be modified with information from the DCB or an existing data set label or with system control information.

When the TYPE=J operand is specified, also supply a DD statement. However, the amount of information that is given in the DD statement is at your discretion, because you can modify many fields of the system-created JFCB. If you specify DUMMY on your DD statement, the open routine ignores the JFCB DSNAME and opens the data set as dummy. (See Figure 1 for an example of coding that modifies a system-created JFCB.) The DD statement must specify at least the device allocation (see z/OS MVS JCL User's Guide for methods of preventing share status) and a ddname corresponding to the associated DCB DCBDDNAM field.

The MODE operand is not shown here because it is not allowed with the TYPE=J operand of the OPEN macro instruction.

Since OPEN with TYPE=J does not accept a JFCBX from the caller, you cannot change volume serials after the first five volumes.

OPEN TYPE=J will not change the volume attributes (PRIVATE, PUBLIC, or STORAGE) which are assigned to the volume during allocation. For example, if a volume status of PRIVATE is needed but allocation is going to assign a status of PUBLIC, then VOL=PRIVATE should be specified on the DD statement.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014