Utility program
A ready-made program for a common job, such as copying or sorting, driven by statements you give it.
Also written utilities, IBM utilities
Why it matters. You do not write a program to copy a file. You run a utility and tell it what to do.
Syntax
//STEP1 EXEC PGM=utility //SYSPRINT DD SYSOUT=* //SYSIN DD * (control statements)
- IEBGENER
- Copy a sequential file or member.
- IEBCOPY
- Copy, compress and merge libraries.
- IDCAMS
- Catalog and VSAM work.
- DFSORT (SORT)
- Sort, copy, select and reshape.
- IEFBR14
- Do nothing. Let the DDs make or delete files.
- IEHLIST, IEBCOMPR
- List directories and compare datasets.
Try it IEBGENER
- 1
You're editing job UTILCOPY. Its DDs are ready. Write the EXEC statement of STEP1 that runs the copy utility, IEBGENER.
JCL //STEP1 EXEC PGM=IEBGENER - 2
Submit the job UTILCOPY from your DEV JCL library.
SUBMIT 'ZB0001.DEV.JCL(UTILCOPY)' - 3
Read the utility's report, STEP1.SYSPRINT.
OUTPUT UTILCOPY STEP1.SYSPRINT
Remember
- A utility is a supplied program: IEBGENER, IDCAMS, DFSORT and more.
- You run it with EXEC PGM= and give it DDs with standard names.
- Its report is on SYSPRINT.
The usual mistake
Writing a COBOL program just to copy a file
A utility already does it, and is tested. Your program would be extra work to write and check.
Run IEBGENER, or DFSORT with COPY
On real z/OS
MF/OS has IEBGENER, IEBCOPY, IDCAMS, SORT/ICETOOL, IEFBR14 and a few more. The SYSPRINT report for IEBGENER is a Mainframe101 sim: line, not a real IBM message.
Where can I practise Utility program?
Right here, at ZedBank. You take a junior job at a simulated bank and use Utility program in real work, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- IDCAMSThe utility used to create, list, copy and delete datasets, and the standard tool for anything involving VSAM.
- DFSORTThe standard sort utility, used far beyond sorting to select, merge, reformat and summarise records at speed.
- IEBGENERThe classic utility for copying a sequential dataset, and for creating one from data supplied in the JCL.
- IEFBR14A program that does nothing at all, used to create or delete datasets purely through the JCL around it.
- JCLJob Control Language: the language used to tell the mainframe what programs to run, in what order, and with what files.
- SYSPRINTThe conventional DD name a program uses for its messages and report output.