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


Example

z/OS DFSMSdfp Advanced Services
SC23-6861-01

In Figure 1, the macro instruction at EX1 creates a parameter list for two data control blocks: INVEN and MASTER. In creating the list, both data control blocks are assumed to be opened for input; option2 for both blocks is assumed to be DISP. The macro instruction at EX2 moves the system-created JFCBs for INVEN and MASTER into the area you specified, thus making the JFCBs available to your problem program for modification. The macro instruction at EX3 modifies the parameter list entry for the data control block named INVEN and indicates, through the TYPE=J operand, that the problem program is supplying the JFCBs for system use.

Figure 1. Example Code Using RDJFCB Macro
EX1       RDJFCB (INVEN,,MASTER),MF=L
          .
          .
          .
EX2       RDJFCB MF=(E,EX1)
          .
          .
          .
EX3       OPEN (,(RDBACK,LEAVE)),TYPE=J,MF=(E,EX1)
          .
          .
          .
INVEN     DCB      EXLST=LSTA,...
MASTER    DCB      EXLST=LSTB,...
LSTA      DS       0F
          DC       AL1(EXLLASTE+EXLRJFCB)
          DC       AL3(JFCBAREA)
          .
          .
          .
JFCBAREA  DS       0F,176C
          .
          .
          .
LSTB      DS       0F
          .
          .
          .
          IHAEXLST ,      DCB exit list mapping

Multiple data control block addresses and associated options can be specified in the RDJFCB macro instruction. This facility makes it possible to read several job file control blocks in parallel.

An exit list address must be provided in each DCB specified by an RDJFCB macro instruction. Each exit list must contain an active entry of either or both types supported by RDJFCB.

RDJFCB processes the first of each of the two types of its entries in the exit list. For example, in a three-entry list containing types 07, 07 and 13, RDJFCB will process the first and third entries and ignore the second entry. An ignored entry has no effect on the RDJFCB return code.

Each of the entries is briefly explained in the following text. A full discussion of the exit list and its use is contained in z/OS DFSMS Using Data Sets.

After RDJFCB is performed, register 15 contains one of the following codes:

Table 1. Return Codes from the RDJFCB Macro
Return Code Meaning
0 (X'00') RDJFCB function completed successfully.
4 (X'04') One or more DCBs encountered one of the following conditions and were skipped. DCBs that were not skipped were processed successfully.
  • The DCB was being processed by Open/Close/EOV or a similar function.
  • No data set with the DDNAME that is in the DCB is allocated.
  • The DCB is not open and its DDNAME is blank.
8 (X'08') One or more DCBs had an ARL that could not be processed. Each ARL contains a reason code describing its status.

One or more DCBs might have encountered a condition described under return code 4. This type of ARL does not contain a reason code.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014