Menu
CoddyTech

IEBGENER

Part of the Batch Jobs with JCL section of Coddy's COBOL Programming journey. Lesson 8 of 19.

z/OS comes with utility programs that jobs run with no COBOL at all. IEFBR14 does nothing: its step only applies its DD statements' DISP, the usual way to create or delete a data set:

//DELOLD   EXEC PGM=IEFBR14
//OLDBKUP  DD DSN=CODDY.CUST.BACKUP,DISP=(OLD,DELETE)

IEBGENER copies a data set. It reads SYSUT1, writes SYSUT2, prints its messages to SYSPRINT, and reads control statements from SYSIN; DUMMY there means none, a plain copy:

//PRINT    EXEC PGM=IEBGENER
//SYSUT1   DD DSN=CODDY.CUST.MASTER,DISP=SHR
//SYSUT2   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY

With SYSUT2 as SYSOUT=*, IEBGENER prints the data set with the job. Its SYSPRINT says PROCESSING ENDED AT EOD: it copied to the end of the data.

Sites also copy and sort with DFSORT, manage data sets with IDCAMS, and keep nightly copies as the generations of a GDG. This course runs none of them; its jobs sort with a COBOL SORT.

challenge icon

Challenge

Easy

Print CODDY.CUST.MASTER with IEBGENER. Under the EXEC, write its four DD statements in order: SYSUT1 reads the data set shared, SYSUT2 and SYSPRINT print with the job, and SYSIN is dummy.

Try it yourself

//SHOWCUST JOB (ACCT),'CODDY',CLASS=A,MSGCLASS=X
//PRINT    EXEC PGM=IEBGENER
//* Write the four DD statements here
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Batch Jobs with JCL

Practice on your own: Online COBOL compiler