Skip to content
Expertise

Algorithm – File copy utilities

Finds improvements in file copy utilities in mainframe environments. The goal of this detection is twofold: to reduce the consumption and the duration of the processes affected.

  • Finds improvements in file copy utilities in mainframe environments.

  • The goal of this detection is twofold: to reduce the consumption and the duration of the processes affected.

The algorithm

The aim is to detect batch processes with a file copy step that uses a utility that is not the best one for performance: IDCAMS, ICEGENER, IEBGENER, COPY.

To detect them in z/OS mainframe installations, we need access to the information held in the system logs; specifically, two SMF records: SMF15 and SMF30.

From each one we need certain information:

  • SMF15: This record holds information about the files written as output by batch process steps.

  • SMF30: This record holds information about the consumption of batch processes, both per process (JCL) and the detailed consumption and duration of each step it runs.

Execution

The algorithm works by taking the fields it needs from each of the SMF records above and then matching the data, to get a list of candidates whose copy utility can be changed.

For example, to detect IDCAMS (REPRO INFILE) used as a copy step, we first match the SMF15 and SMF30 records and keep only the steps that run the IDCAMS program and write an output file, which tells us that IDCAMS with REPRO INFILE is being used to copy a file.

This produces a file with every step that uses that utility for copying. We can then filter the candidates by a minimum CPU consumption or run time (elapsed) threshold, and sort them to see which candidates have the biggest impact according to the criteria defined. We can also filter to select only the ones that run in a given time window, or to find out which applications have the most inefficient candidates.

Results

Running this algorithm detects the z/OS batch process steps that use a file copy step that is not the most efficient one, and that can therefore be replaced by a SORT FIELDS=COPY step that improves both the consumption and the duration of the step and of the process itself.

Below is an example from a real case, comparing different copy utilities, IDCAMS (REPRO) and IEBGENER, which shows that SORT FIELDS=COPY is 70–85% more efficient in CPU and 70–80% more efficient in elapsed time.

File copy utilities compared: IDCAMS, IEBGENER and SORT COPY

So changing the copy utility brings a benefit in two areas of the z/OS installation:

  • Lower CPU consumption, and therefore fewer MIPS used, which means a direct cost saving.

  • Shorter process durations, and therefore more margin for processes with an SLA (those with a target end time).