Saturday 10 August 2013

JCL IEBGENER Utility | IEBGENER Examples | IEBGENER VS IEBCOPY | IEBGENER Utility in JCL [JCL Utilities].

IEBGENER Utility in JCL, iebgener examples, iebgener in mainframe,

IEBGENER Utility in JCL.

IEBGENER Utility in JCL is an easy way to copy, print, and create non-VSAM datasets. The IEBGENER utility is used to copy multiple files or copy a single file. In this session, you'll learn the basics of the IEBGENER utility, followed by IEBGENER DD control statements and the IEBGENER SYSIN control statements. To reinforce your understanding, I will walk you through the IEBGENER examples. Let's get started with an introduction to the IEBGENER utility. 

IEBGENER Utility Tutorial - Agenda. 

  • Introduction. 
  • IEBGENER DD Statements/IEBGENER SYSIN Statements.
  • IEBGENER Vs IEBCOPY utility.
  • IEBGENER Examples.
  • IEBGENER in JCL - YouTube video.
  • Conclusion.

Introduction.

Let's try to answer or let's try to understand what is JCL utility or what do you understand by the term utility. In layman terms, mainframe utility programs or just utilities are the programs that can be used for common data processing functions like copying or printing a data set these utilities are supplied with IBM z/OS and they're widely used in batch jobs now let's talk about IEBGENER utility.

What is the IEBGENER Utility in JCL?


IEBGENER Utility

IBM IEBGENER Utility.

IEBGENER utility in JCL, it is a popular mainframe utility. IEBGENER utility is a copy program that has been a part of the operating system since the first release of OS/360 and one of its many uses is to copy a sequential data set a member of partition data set (i.e. PDS) or PDSE or probably z/OS Unix system services files such as HFS files.
  
As a result, the IEBGENER utility is used can be used to backup or restore sequential data sets you can also use this utility to print a non-VSAM sequential data set by copying it to an SYSOUT data set. Finally, the common use of IEBGENER utility is to create, reformat, and backup non-VSAM sequential data sets

You can use IEBGENER to perform the following daily tasks:
  • IEBGENER utility in the JCL is used to create a backup of the sequential data set.
  • IEBGENER utility can be used to print a non-VSAM sequential data set.
  • IEBGENER utility can be used to rearrange fields and convert their data formats. 
  • IEBGENER utility can amplify an existing partitioned data set (PDS).
  • IEBGENER utility can change or re-block the data set record logical length. Copy user labels on sequential output data sets. 
The following figure, explains the process of creating partitioned data set from sequential data et. The sequential dataset is represented by the left section of the figure.

The IEBGENER utility statement is used to split a sequential dataset into logical record groups. Finally, the right section of the fig represents a partitioned data set.


IBM utility, IEBGENER Utility in JCL, JCL IEBGENER

IEBGENER Utility Creating PDS sequential data set.

                                    

IEBGENER DD Statements and IEBGENER SYSIN control statements

Now, let's try to understand what are the different DD statements that are required by an IEBGENER utility. There are four different DD statements that are required by an IEBGENER utility.

iebgener in mainframe, iebgener sysin control statements, jcl iebgener

JCL IEBGENER Utility DD Statement.


  • SYSUT1 - it's used to specify the input file.
  • SYSUT2 - it's used to specify the output file.
  • SYSPRINT - it's an output message file.
  • SYSIN - it's used to specify the control parameters.
Important point - If you do not want to use a control statement the SYSIN DD statement is still required. You must code it as a dummy data set.

What is the difference between IEBGENER utility and IEBCOPY utility (iebgener vs iebcopy)?

Well, the correct answer is that both utilities are used for data processing. However, the IEBGENER utility is used for the non-VSAM sequential data sets. It's used to copy, create print or reformat data set as you copy.

IEBCOPY utility in the JCL is primarily used to perform the operation on a personal data set (PDS) or PSDE. It's used to copy, merge, compress, or archive a PDS into a sequential file. 

IEBGENER Example - Sample JCL to invoke the IEBGENER utility (iebgener syntax). 

//RXTC02T JOB ... (JOB CARD)
//STEP1    EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSNAME=RC.EMP.SAL.FILE,DISP=SHR
//SYSUT2   DD DSNAME=RC.EMP.SAL.FILE.BKP,DISP=OLD
//SYSIN    DD DUMMY
/*

Now, let's go through IEBGENER Examples.

The following IEBGENER JCL example illustrates the use of the IEBGENER utility to copy multiple files or to copy PDS members. Let's discuss each step one by one.  

//TPRCK99A JOB 'TOPICTRICK',MSGCLASS=A,CLASS=C,
//             MSGLEVEL=(1,1),NOTIFY=&SYSUID
//*
//* PROJECT DESC:: SAMPLE JCL TO INVOKE IEBGENER UTILITY.
//* :: IEBGENER Examples.
//*
//* STEP01  :: IEBGENER Utility to backup dataset.
//*
//STEP01 EXEC PGM=IEBGENER
//SYSUT1   DD DSN=Z03130.INPUT.FILE,DISP=SHR
//SYSUT2   DD DSN=Z03130.INPUT.FILE.BKP,DISP=(NEW,CATLG),
//            UNIT=SYSDA,SPACE=(CYL,(5,1))
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//*
//* STEP02 - IEBGENER example to Print Dataset .
//*
//STEP02 EXEC PGM=IEBGENER
//SYSUT1   DD DSN=Z03130.INPUT.FILE,DISP=SHR
//SYSUT2   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//*
//* STEP03 - IEBGENER Utility example to Copy PDS member data.
//*
//STEP03 EXEC PGM=IEBGENER
//SYSUT1   DD DSN=Z03130.PDS.REXX(REXX001),DISP=SHR
//SYSUT2   DD DSN=Z03130.PDS.REXX.BKP(REXBKP),DISP=(OLD)
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//*
//* STEP04 - IEBGENER example to Reformat data while copying the data.
//* - How to use IEBGENER Generate and Record field.
//*
//STEP04 EXEC PGM=IEBGENER
//SYSUT1   DD DSN=Z03130.INPUT.FILE,DISP=SHR
//SYSUT2   DD DSN=Z03130.INPUT.FILE.BKP,DISP=OLD
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
  GENERATE MAXFLDS=11,MAXLITS=10
  RECORD FIELD=(23,1,,1),FIELD=(8,'EMP SAL-',,24),                     X
         FIELD=(4,24,,32)
/*
//
Created with Artisteer


IEBGENER utility in JCL - YouTube Video.




Conclusion. 

Finally, this marks an end to the JCL IEBGENER Utility tutorial (JCL Utility). In this tutorial, you learn the basics of IEBGENER utility and the use of IEBGENER utility. Also, you learned how to use the IEBGENER utility in JCL. Do check out COBOL LEVEL 88 Condition.


Subscribe to Topictrick & Don't forget to press THE BELL ICON to never miss any updates. Also, Please visit mention the link below to stay connected with Topictrick and the Mainframe forum on - 

► Youtube
► Facebook 
► Reddit

Thank you for your support. 
Mainframe Forum™

No comments:

Post a Comment

New In-feed ads