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


Using Parallel Data Access Blocks (PDAB)

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

You specify a request for parallel input processing by including the address of a parallel data access block (PDAB) in the DCB exit list. For more information on the DCB exit list, see DCB Exit List.

Use the PDAB macro to create and format a work area that identifies the maximum number of DCBs that can be processed at any one time. If you exceed the maximum number of entries specified in the PDAB macro when adding a DCB to the queue with the OPEN macro, the data set will not be available for parallel input processing. However, it will be available for sequential processing.

When issuing a parallel GET macro, register 1 must always point to a PDAB. You can load the register or let the GET macro do it for you. When control is returned to you, register 1 contains the address of a logical record from one of the data sets in the queue. Registers 2 - 13 contain their original contents at the time the GET macro was issued. Registers 14, 15, and 0 are changed.

Through the PDAB, you can find the data set from which the record was retrieved. A fullword address in the PDAB (PDADCBEP) points to the address of the DCB. It should be noted that this pointer could be nonvalid from the time a CLOSE macro is issued to the issuing of the next parallel GET macro.

In Figure 1, not more than three data sets (MAXDCB=3 in the PDAB macro) are open for parallel processing at a time.

Figure 1. Parallel Processing of Three Data Sets
           ...
           OPEN  (DATASET1,(INPUT),DATASET2,(INPUT),DATASET3,         X
                 (INPUT),DATASET4,(OUTPUT))
           TM    DATASET1+DCBQSWS-IHADCB,DCBPOPEN  Opened for
*                                         parallel processing
           BZ    SEQRTN                   Branch on no to
*                                         sequential routine
           TM    DATASET2+DCBQSWS-IHADCB,DCBPOPEN
           BZ    SEQRTN
           TM    DATASET3+DCBQSWS-IHADCB,DCBPOPEN
           BZ    SEQRTN
GETRTN     GET   DCBQUEUE,TYPE=P
           LR    10,1                     Save record pointer
           ...
           ...                            Record updated in place
           ...
           PUT   DATASET4,(10)
           B     GETRTN
EODRTN     L     2,DCBQUEUE+PDADCBEP-IHAPDAB
           L     2,0(0,2)
           CLOSE   ((2))
           CLC   ZEROS(2),DCBQUEUE+PDANODCB-IHAPDAB  Any DCBs left?
           BL    GETRTN                   Branch if yes
           ...
DATASET1   DCB   DDNAME=DDNAME1,DSORG=PS,MACRF=GL,RECFM=FB,           X
                 LRECL=80,EODAD=EODRTN,EXLST=SET3XLST
DATASET2   DCB   DDNAME=DDNAME2,DSORG=PS,MACRF=GL,RECFM=FB,           X
                 LRECL=80,EODAD=EODRTN,EXLST=SET3XLST
DATASET3   DCB   DDNAME=DDNAME3,DSORG=PS,MACRF=GL,RECFM=FB,           X
                 LRECL=80,EODAD=EODRTN,EXLST=SET3XLST
DATASET4   DCB   DDNAME=DDNAME4,DSORG=PS,MACRF=PM,RECFM=FB,           X
                 LRECL=80
DCBQUEUE   PDAB  MAXDCB=3
SET3XLST   DC    0F'0',AL1(EXLLASTE+EXLPDAB),AL3(DCBQUEUE)
ZEROS      DC    X'0000'
           DCBD  DSORG=QS
           PDABD
           IHAEXLST ,     DCB exit list mapping
           ...

The number of bytes required for PDAB is equal to 24 + 8n, where n is the value of the keyword, MAXDCB.

If data definition statements and data sets are supplied, DATASET1, DATASET2, and DATASET3 are opened for parallel input processing as specified in the input processing OPEN macro. Other attributes of each data set are QSAM (MACRF=G), simple buffering by default, locate or move mode (MACRF=L or M), fixed-length records (RECFM=F), and exit list entry for a PDAB (X'92'). Note that both locate and move modes can be used in the same data set queue. The mapping macros, DCBD and PDABD, are used to refer to the DCBs and the PDAB respectively.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014