BeginnerDataset
Allocating datasets: worked examples
The four allocations you will need most, with the parameters explained.
* 1. a fixed-length sequential file //OUT1 DD DSN=DEV.PAY.EXTRACT,DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(50,10),RLSE), // DCB=(RECFM=FB,LRECL=200,BLKSIZE=0) * 2. a variable-length file (LRECL includes the 4-byte prefix) //OUT2 DD DSN=DEV.PAY.LOG,DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(10,5),RLSE), // DCB=(RECFM=VB,LRECL=1004,BLKSIZE=0) * 3. a PDSE library (third space value = directory blocks, ignored for PDSE) //OUT3 DD DSN=DEV.PAY.NEWLIB,DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(10,5,50)),DSNTYPE=LIBRARY, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=0) * 4. a temporary work file passed to a later step //WORK DD DSN=&&TEMP,DISP=(NEW,PASS), // SPACE=(CYL,(20,10)),UNIT=SYSDA, // DCB=(RECFM=FB,LRECL=200,BLKSIZE=0)
Sizing space sensibly
- Work out roughly how many records and multiply by the record length.
- One 3390 cylinder holds a little under 800KB, so estimate cylinders from total bytes and add headroom.
- Set the secondary to about 20% of the primary so growth does not exhaust extents.
- Always add RLSE so unused space comes back at close.
- If the site uses storage classes, ask which one applies — many of these parameters may then be supplied for you.
Stuck on something else?
Ask the community or search the full course.