Do you have any performance/tuning tips

Document ID : KB000028459
Last Modified Date : 14/02/2018
Show Technical Document Details

General Performance Considerations:

  1. When accessing multiple files, put those files on different disk devices to avoid DASD arm contention.

  2. Use the highest priority when running the job.

  3. Do not run other programs that use the same resources at the same time.

  4. Use maximum file buffering.

  5. Use optimum blocking factors.

  6. For VSAM files that are also read by an online system, specify share options 2 or 4.

  7. Reorganize VSAM files so that they are not fragmented.

  8. If accessing a small number of records from a large file, read them with keys instead of sequentially.

  9. Use disk instead of tape whenever possible.

  10. Do not use the DEBUG parameters of COBOL (when calling subroutines).

  11. Break down huge datasets to smaller, logical datasets.

  12. Increase REGION size.

  13. If making CALLs to any LE subprogram, be it COBOL or assembler, be sure 'COBOL' is specified as the value for the ENVIRON Option or ENVIRONMENT Parameter

CA Easytrieve Plus Specific Considerations:

  1. Install CA Easytrieve into the LPA to reduce 90% of the loading of phases. All of the modules except the following can be put into the LPA:


  2. Execute link-edited programs instead of compile and go.

  3. Produce multiple reports with a single pass of the dataset(s).

  4. Send reports to individual disk datasets to reduce VFM disk contention.

  5. Do not use the DEBUG parameters of CA Easytrieve in production.

  6. Use binary searches (tables) instead of multiple nested IF statements.

  7. Use binary fields whenever possible to perform arithmetic operations. If a 4-byte binary field is not large enough use an 8-byte packed field.

  8. Use indexes instead of subscripts. If you must use a subscript define it as 2 bytes binary.

  9. When comparing fields or doing any arithmetic operation use fields that have the same data type, length and number of decimals.

The BUFNO parameter of the FILE statement establishes the number of input/output buffers allocated for the file. The default in CA Easytrieve+ is two. Since minimizing the number of physical I/O operations is essential to maximizing performance, you should experiment with larger BUFNO values. Please note this value will only affect the buffering for sequentially organized files, such as QSAM. VSAM file buffers should be allocated in the JCL through the use of the AMP parameter or in the VSAM file definition.

By default, the CA Easytrieve options file provides three dynamically allocated sortwork datasets. If you would like to increase this number or turn off this option to use your own SORTWK datasets from your JCL, use the WORK parameter on the PARM statement.

PARM WORK 0 this will turn off any dynamic allocation by CA Easytrieve.
PARM WORK 5 this will dynamically allocate 5 sortwork datasets

To change the CA Easytrieve options file to eliminate the need to code the PARM, change the NUMWORK parameter, for example:

NUMWORK=0 this means you must always have SORTWORK DDs in your JCL
NUMWORK=5 this means you will always have five dynamically allocated sortwork datasets provided by CA Easytrieve. You will NOT use any of the SORTWORK DDs from the JCL.

Also, when implementing a SORT activity, you can use the BEFORE parameter to identify a procedure to pre-screen input records. Adding a SELECT clause can cut down the number of records used by the CA Easytrieve program.

The VFMSPAC parameter in the options table (which may be overridden with the VFM parameter in the PARM statement) could have an important role in determining execution time. EASYTRIEVE PLUS uses its virtual file manager (VFM) to allocate the temporary data sets required during processing. Whenever a programmer builds a temporary file within his program by specifying VIRTUAL in the FILE statement VFM resources are used.

Additionally, CA Easytrieve creates work files to hold report data whenever the SEQUENCE statement is specified in the report, or if multiple reports are generated from the same program. VFM space is 40% of the total region, or partition space for most CA Easytrieve programs.

Should a program exhaust the region memory specified by the above parameters, it will satisfy any additional requirements by acquiring DASD space via the EZTVFM dataset, specified in the JCL. Typically the EZTVFM dataset is allocated in cylinders or work DASD. In an MVS environment, you may specify UNIT=VIO on the EZTVFM DD statement instead of UNIT=DISK or UNIT=SYSDA. The use of VIO is quicker than DASD and the space it utilizes is not part of the region in which the program is running.

In the case of multiple reports in the same program with a high volume of VFM usage, use of the FILE parameter of the REPORT statement is highly recommended. Since the EZTVFM data set used for the overflow of VFM is limited to one pack, contention for the space can be high when multiple reports are generated, causing performance degradation. The FILE parameter enables the programmer to specify separate work datasets to be used instead of the VFM area reducing the EZTVFM contention.

When comparing fields or doing any arithmetic operation, use fields that have the same data type, length, and number of decimals.