Allocate Datasets
Allocate Datasets
Summary
- IEFBR14 is used to create/allocate empty datasets. The dataset can be either a Sequential file (PS) or Partitioned Dataset (PDS).
- ISPF foreground option 3.2 (Data Set Utility panel) is also used to create the datasets. However, the IEFBR14 utility is mostly used to create the datasets as part of a batch run.
- The disposition (DISP) to catalog the dataset is DISP=(NEW,CATLG,DELETE).
Syntax -
//Job-Card
//*
//STEP1 EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//DD1 DD DSN=datset.name, DISP=(NEW,CATLG,DELETE),…
- DISP=(NEW,CATLG,DELETE) - Specifies to create a new dataset.
Example1 -
Scenario - Create a PS file using the IEFBR14 utility.
JCL -
----+----1----+----2----+----3----+---4----+---5---+----6---+---7--
//MATEPKI JOB (123),'MTH',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//************************************************************
//* ALLOCATE PS DATA SET USING IEFBR14 UTILITY
//************************************************************
//STEP01 EXEC PGM=IEFBR14
//DD1 DD DSN=MATEPK.IEFBR14.PSFILE,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(3,2),RLSE),
// UNIT=SYSDA,VOLUME=SER=DEVHD4,
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800)
**************************** Bottom of Data ****************************
Output -
Go to Spool (SDSF -> ST) and verify the status in the JESYSMSG DDname of the corresponding job.
********************************* TOP OF DATA **********************************
ICH70001I MATEPK LAST ACCESS AT 11:12:09 ON SATURDAY, AUGUST 20, 2022
IEF236I ALLOC. FOR MATEPKI STEP10
IGD100I 0ABB ALLOCATED TO DDNAME DD1 DATACLAS ( )
IEF142I MATEPKI STEP01 - STEP WAS EXECUTED - COND CODE 0000
IEF285I MATEPK.IEFBR14.PSFILE CATALOGED
IEF285I VOL SER NOS= DEVHD4.
IEF373I STEP/STEP01 /START 2022232.1112
IEF032I STEP/STEP01 /STOP 2022232.1112
CPU: 0 HR 00 MIN 00.01 SEC SRB: 0 HR 00 MIN 00.00 SEC
VIRT: 4K SYS: 228K EXT: 0K SYS: 13476K
IEF375I JOB/MATEPKI /START 2022232.1112
IEF033I JOB/MATEPKI /STOP 2022232.1112
CPU: 0 HR 00 MIN 00.01 SEC SRB: 0 HR 00 MIN 00.00 SEC
******************************** BOTTOM OF DATA ********************************
Explaining Example -
- DD1 DD - This DD statement specifies PS dataset attributes for creation.
- IEF142I MATEPKI STEP01 - STEP WAS EXECUTED - COND CODE 0000 - Specifies the STEP01 completed successfully.
- MATEPK.IEFBR14.PSFILE CATALOGED - Specifies the MATEPK.IEFBR14.PSFILE file successfully created and cataloged.
Example2 -
Scenario - Create a PDS using the IEFBR14 utility.
JCL -
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
//MATEPKP JOB (123),'MTH',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//*************************************************************
//* ALLOCATE PDS DATA SET USING IEFBR14 UTILITY
//*************************************************************
//STEP01 EXEC PGM=IEFBR14
//DD1 DD DSN=MATEPK.IEFBR14.PDSFILE,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(10,10,10),RLSE),
// UNIT=SYSDA,VOLUME=SER=DEVHD4,
// DCB=(DSORG=PO,RECFM=FB,LRECL=80,BLKSIZE=800)
**************************** Bottom of Data ****************************
Output -
Go to Spool (SDSF -> ST) and verify the status in the JESYSMSG DDname of the corresponding job.
********************************* TOP OF DATA *********************************
ICH70001I MATEPK LAST ACCESS AT 11:12:33 ON SATURDAY, AUGUST 20, 2022
IEF236I ALLOC. FOR MATEPKP STEP01
IGD100I 0ABB ALLOCATED TO DDNAME DD1 DATACLAS ( )
IEF142I MATEPKP STEP01 - STEP WAS EXECUTED - COND CODE 0000
IEF285I MATEPK.IEFBR14.PDSFILE CATALOGED
IEF285I VOL SER NOS= DEVHD4.
IEF373I STEP/STEP01 /START 2022232.1116
IEF032I STEP/STEP01 /STOP 2022232.1116
CPU: 0 HR 00 MIN 00.01 SEC SRB: 0 HR 00 MIN 00.00 SEC
VIRT: 4K SYS: 228K EXT: 0K SYS: 13476K
IEF375I JOB/MATEPKP /START 2022232.1116
IEF033I JOB/MATEPKP /STOP 2022232.1116
CPU: 0 HR 00 MIN 00.01 SEC SRB: 0 HR 00 MIN 00.00 SEC
******************************** BOTTOM OF DATA *******************************
Explaining Example -
- DD1 DD - This DD statement specifies PDS dataset attributes for creation.
- IEF142I MATEPKP STEP01 - STEP WAS EXECUTED - COND CODE 0000 - Specifies the STEP01 completed successfully.
- MATEPK.IEFBR14.PDSFILE CATALOGED - Specifies the MATEPK.IEFBR14.PDSFILE successfully created and cataloged.