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


With BDAM to Allocate a VIO Data Set

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

If a VIO data set is opened for processing with the extended search option, BDAM does not search unused tracks. The information needed to determine the data set size is written in the DSCB during the close of the DCB used in the create step. Therefore, if this data set is being allocated and processed by the same program, and the DCB used for creating the data set has not been closed before opening the DCB to be used for processing, the resultant beginning and ending CCHH will be equal.

Example: In the example problem in Figure 1, a tape containing 204-byte records arranged in key sequence is used to allocate a direct data set. A 4-byte binary key for each record ranges from 1000 to 8999, so space for 8000 records is requested.

Figure 1. Creating a Direct Data Set (Tape-to-Disk)
   //DAOUTPUT DD     DSNAME=SLATE.INDEX.WORDS,DCB=(DSORG=DA,         C
   //            BLKSIZE=200,KEYLEN=4,RECFM=F),SPACE=(204,8000),---
   //TAPINPUT DD     ---
              ...
   DIRECT     START
              ...
              L      9,=F'1000'
              OPEN   (DALOAD,(OUTPUT),TAPEDCB)
              LA     10,COMPARE
   NEXTREC    GET    TAPEDCB
              LR     2,1
   COMPARE    C      9,0(2)       Compare key of input against
   *                                             control number
              BNE    DUMMY
              WRITE  DECB1,SF,DALOAD,(2)         Write data record
              CHECK  DECB1
              AH     9,=H'1'
              B      NEXTREC
   DUMMY      C      9,=F'8999'    Have 8000 records been written?
              BH     ENDJOB
              WRITE  DECB2,SD,DALOAD,DUMAREA     Write dummy
              CHECK  DECB2
              AH     9,=H'1'
              BR     10
   INPUTEND   LA     10,DUMMY
              BR     10
   ENDJOB     CLOSE  (TAPEDCB,,DALOAD)
              ...
   DUMAREA    DS     8F
   DALOAD     DCB    DSORG=PS,MACRF=(WL),DDNAME=DAOUTPUT,          C
                     DEVD=DA,SYNAD=CHECKER,---
   TAPEDCB    DCB    EODAD=INPUTEND,MACRF=(GL), ---
              ...

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014