Showing posts with label dd dummy statement in jcl. Show all posts
Showing posts with label dd dummy statement in jcl. Show all posts

Saturday, 10 August 2013

JCL IEFBR14 Utility | IEFBR14 DELETE | IEFBR14 Example.

JCL IEFBR14 DELETE
IEFBR14 Utility.

In this tutorial, you'll learn IBM supplied utility. By the end of this tutorial, you'll be able to learn and use IEFBR14 for various data set allocation or data set deletion task. So, without any further discussion lets quickly jumped into IEFBR14 utility description and IEFBR14 utility example.

What is the IEFBR14 utility? 

IEFBR14 is an IBM-supplied program that doesn’t do anything. Instead, it performs an assembler language command that causes it to return control to Z/OS and terminate. This, however, also forces Z/OS to allocate and deallocate any data sets defined in the job step’s DD statements.

Although IEFBR14 was once the standard way of creating empty data sets or deleting data sets that were no longer needed, today you are more likely to use TSO/E or ISPF to perform these functions interactively.

IEFBR14 is a very useful IBM supplied utility, IEFBR14 utility forces the system to perform step allocation and deallocation. In fact, it's one of my favorite utility.  I always use this utility to allocate or to delete any sequential data-set.  

In other words, even though the program itself doesn’t do anything, it forces z/OS to process any DD statements you include in the job step that executes it. As a result, any data sets you to create by specifying DISP=(NEW,KEEP) or DISP=(NEW,CATLG) are allocated and kept or cataloged. Likewise, you can delete or uncatalog a data set by specifying DISP=(OLD,DELETE) or DISP=(OLD,UNCATLG).

For example, you want to create a sequential data-set, then you simply write a JCL and submit that job, to initiate an IEFBR14 utility to allocate the required file.  

IEFBR14 Utility example to create data-set. 

The following job is using IEFBR14 utility to create and delete a data-set. 

//MCTX0RE  JOB  99999,'RC IBMBLOG',MSGCLASS=(1,1)
//STEP01   EXEC PGM=IEFBR14
//DD1      DD  DSNAME=RCTX.PAYROL.FILE,DISP=(NEW,CATLG),
//             UNIT=SYSDA,SPACE=(100,(10,25,5),,,ROUND),
//             DCB=(RECFM=FB,LRECL=80)
//DD2      DD  DSNAME=RCTX.TEST.DATA,DISP=(OLD,DELETE)

Programming Tip: IEFBR14 Utility | IEFBR14 Delete Utility | Mainframe Utility.

  • For deleting data-set: Always use IDCAMS H DELETE despite IEFBR14 utility because it works best when files are migrated to the tape. IDCAMS H DELETE scratch files without recalling them, thus save a lot of time and I/O. 

Top Interview Question:

  • Is it possible to delete the VSAM file with the IEFBR14 utility?  
  • Yes, the VSAM file can be deleted with IEFBR14 utility. However, IDCAMS are the most preferred utility to perform operations on  VSAM data-sets.
  • What is IEFBR14 utility and what is it used for?
  • IEFBR14 is an IBM-supplied program/utility that doesn’t do anything. It's primarily used for creating or deleting data-sets.

For more details regarding other important IBM supplied utility. You can check out the IBM Z/OS Basic Skill Portal. 


Sunday, 28 July 2013

JCL DD Statement, Override DD Statement in JCL Example.

DD Statement
JCL DD Statement

In Today's JCL DD Statement or DD Statement in JCL, you learned how to code DD statements to allocate the DASD data sets that are processed by a job step. This tutorial precisely describes the JCL DD statement format with various DD statements examples. In addition, it shows you how to allocate special types of DASD data sets that you’ll only need in certain jobs. So, let's start with the tutorial. 

What is the JCL DD Statement?


JCL DD Statement stands for Data Definition (DD) statements. The DD statements are used to describe input/output data-sets for any COBOL program. The JCL DD statements are primarily defined after the EXEC statement that identifies the program. Normally, you code one DD statement for each data set your program will process.

The JCL DD statement provides the system with information about a data set, such as its organization, storage requirements, and record length, etc. 

The DD statement is the most complicated of all the JCL statements. This is because of the many parameters and subparameters it has, as well as the many ways you can code those parameters to allocate different types of data sets. 

How to code the JCL DD statement for DASD data sets?


Before explaining how to code a JCL DD statement. You need some overview of the different types of data sets in z/OS. 

IBM z/OS mainframe operating system provides a variety of data sets that are evolving, with new features added and older form retain for compatibility. Many of the new features come through SMS. Some SMS need to be active only at your installation.

Others are available only for SMS-managed datasets. Your installation will tell you whether SMS is active at your installation. When SMS is active, your installation can set various default for non-SMS-managed data sets.

For SMS-managed data sets, your installation will tell you the different storage, management, and data classes available and what option applies to each. A great deal of information must be supplied to read and write a data set, including the data set organization, record type, record length, and block length.

Supplying this information is one thing that makes JCL difficult. The information may come from three sources: the data control block (DCB) in the application, DD statement, and the data set label.

The syntax of the JCL DD statement.


//ddname DD DSNAME=data-set-name
            ,DISP=(status,normal-disp,abnormal-disp)
          [ ,UNIT=unit ]
          [ ,VOL=SER=serial-number ]
          [ ,SPACE=unit,(primary-qty,secondary-qty,dir) ]
          [ ,DCB=(option,option…) ]

DSNAME | Specifies the dataset name. 
DISP   | Specifies the dataset disposition (NEw, OLD, DEL, etc.) 
UNIT   | Specifies the group name, device type for new datasets.
SPACE  | Specifies the DASD space to be allocated for the file. 
DCB    | Specifies the parameter for the file’s data control block.

Examples of the DD statement.

A JCL DD statement to use an existing data set. 

//MSTFLE  DD   DSNAME=RC01.MSTFILE.MNTHLY,DISP=SHR

A JCL DD statement that creates a new data set and catalogs it 

//PAYMAST  DD  DSNAME=RC09.PAYROL.EMP.FILE,DISP=(NEW,CATLG),
//             UNIT=SYSDA,SPACE=(CYL,(10,10)),
//             DCB=(RECFM=FB,LRECL=110)

An SYSOUT DD SYSOUT=* statement is used to specify system output data-set, refer below an example of how to use dd sysout=* in JCL. 

//SYSOUT DD SYSOUT=*


What is the DUMMY Data Sets?


Dummy data-sets allow you to execute programs that process files without actually having the files present. When you use a dummy file, the system mimics performs all the file operations tasks with the DUMMY file. When a program tries to read a record from a dummy file, z/OS indicates an end-of-file condition, and when a program writes a record to a dummy file, the data is discarded.

DD DUMMY syntax in JCLs. 

//ddname DD DUMMY [,parameter]…


How to use SYSOUT DD DUMMY in JCL? 

In case, you have a requirement to suppress the processing of an SYSOUT data-set, then you must use the sysout dd dummy statement.  

SYSOUT DD DUMMY Syntax: 

   //ddname  DD  DUMMY,SYSOUT=class [Mention Class Name]

Thus, if you specify SYSOUT DD DUMMY statement, then system ignores the SYSOUT parameters and skip all output operation to the spool. 

SYSOUT DD DUMMY Example:

//INFFILE  DD  DUMMY,SYSOUT=A


How to override DD statement in JCL. 

To override DD name in JCL you need to follow below mention process i.e. PROC dd step-name.JCL DD name followed by other parameters. 

//pstepname.ddname DD     parameters

          

New In-feed ads