Post By: Hanan Mannan
Contact Number: Pak (+92)-321-59-95-634
-------------------------------------------------------
Contact Number: Pak (+92)-321-59-95-634
-------------------------------------------------------
JCL - Utility Programs
IBM Dataset Utilities
Utility programs are pre-written programs, widely used in mainframes by system programmers and application developers to achieve day-to-day requirements, organising and maintaining data. A few of them are listed below with their functionality:
Utility Name | Functionality |
---|---|
IEHMOVE |
Moves or copies sequential datasets.
|
IEHPROGM |
Deleting and renaming datasets; catalog or uncatalog datasets other than VSAM.
|
IEHCOMPR |
Compares data in sequential datasets.
|
IEBCOPY |
Copy, Merge, compress, back-up or restore PDS.
|
IEFBR14 |
No operation utility. Used to return control to user and terminate. It is usually used to create empty dataset or delete an existing dataset.
For example, if a dataset is passed as input to a IEFBR14 program with DISP=(OLD,DELETE,DELETE), the dataset is deleted at job completion.
|
IEBEDIT |
Used to copy selected parts of a JCL. For Example, if a JCL has 5 steps and we require to execute step 1 and 3 only, then a IEBEDIT JCL can be coded with a dataset which contains the actual JCL to be executed. In the SYSIN of IEBEDIT, we can specify STEP1 and STEP3 as parameters. When this JCL is executed, it executes the STEP1 and STEP3 of the actual JCL.
|
IDCAMS |
Create, delete, rename, catalog, uncatalog datasets (other than PDS). Usually used to manage VSAM datasets.
|
These utility programs need to be used with appropriate DD statements in a JCL in order to achieve the specified functionality.
DFSORT Overview
DFSORT is a powerful IBM utility used to copy, sort or merge datasets. SORTIN and SORTINnn DD statements are used to specify input datasets. SORTOUT and OUTFIL statements are used to specify output data.
SYSIN DD statement is used to specify the sort and merge conditions. DFSORT is generally used to achieve the below functionalities:
- SORT the input file(s) in the order of the specified field(s) position in the file.
- INCLUDE or OMIT records from the input file(s) based on the specified condition.
- SORT MERGE input file(s) in the order of the specified field(s) position in the file.
- SORT JOIN two or more input files based on a specified JOIN KEY (field(s) in each input file).
- When there is additional processing to be done on the input files, a USER EXIT program can be called from the SORT program. For example, if there is a header/trailer to be added to the output file, then a USER written COBOL program can be called from the SORT program to perform this functionality. Using a control card, data can be passed to the COBOL program.
- On the other way round, a SORT can be called internally from a COBOL program to arrange the input file in a particular order before being processed. Usually, this is not recommended in view of performance for large files.
ICETOOL Overview
ICETOOL is a multi-purpose DFSORT utility used to perform a variety of operations on datasets. Input and output datasets can be defined using user defined DD names. The file operations are specified in the TOOLIN DD statement. Additional conditions can be specified in user defined 'CTL' DD statements.
Few of the utilities of ICETOOL are given below:
- ICETOOL can achieve all the functionalities of DFSORT in one or more conditions.
- SPLICE is a powerful operation of ICETOOL which is similar to SORT JOIN, but with additional features. It can compare two or more files on specified field(s) and create one or more output files like file with matching records, file with non-matching records, etc.
- Data in one file in a particular position can be OVERLAYed into another position in the same or different file.
- A File can be split into n files based on a specified condition. For example, a file containing names of employees can be split into 26 files, each containing the names starting with A, B, C and so on.
- Different combination of file manipulation is possible using ICETOOL with a little exploration of the tool.
SYNCSORT Overview
SYNCSORT is used to copy, merge or sort datasets with a high performance. It gives best utilization of system resources and efficient operation in 31-bit and 64-bit address spaces.
It can be used in the same lines of DFSORT and can achieve the same features. It can be invoked by a JCL or from within a program coded in COBOL, PL/1 or Assembler language. It also supports User Exit programs to be called from the SYNCSORT program.
Frequently used sort tricks using these utilities are explained in the next chapter. Complex requirements, which requires a huge programming in COBOL/ASSEMBLER can be achieved using the above utilities in simple steps.
0 comments:
Post a Comment