Mainframe Path Start learning free
BeginnerDataset

Allocating datasets: worked examples

The four allocations you will need most, with the parameters explained.

Four allocations
* 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

Stuck on something else?
Ask the community or search the full course.

Ask a question