MAXTASKS control statement

The MAXTASKS control statement is used to customize the IMS Index Builder run.

This parameter allows you to control the number of subordinate address spaces (SAS) created. When using the low values range (0, 1, 2), MAXTASKS allows you to pre-determine the scan and sort modes. In default mode, without MAXTASKS specified, IMS Index Builder will select the scan and sort modes, and create the subordinate address spaces that are needed to efficiently process your request. While default mode is generally recommended, you might want to use MAXTASKS instead of the default mode to improve efficiency, or use MAXTASKS after a failure as an alternative approach. MAXTASKS takes effect only when secondary indexes are rebuilt.

When the MAXTASKS statement is specified, IMS Index Builder creates less than or equal to the number of subordinate address spaces that are specified. Two thirds of the subordinate address spaces that are created are allocated to scan. Valid values are 0 - 36, with leading zeros. The maximum field length is 15 characters.

If MAXTASKS 0 is specified, all processing occurs in the master address space using striped sorts. If MAXTASKS 2 is specified, the hierarchical HPU scan is selected and subordinate address spaces are created for buffered sorts.

Read syntax diagramSkip visual syntax diagramMAXTASKSnnPSORT
MAXTASKS
Specifies that this is a MAXTASKS statement.
nn
Valid values are 0 - 36, with leading zeros. Do not specify MAXTASKS 1.
PSORT
Enables the parallel sort for a PSINDEX so that the partitions are sorted in parallel. This sort type can improve the performance of building a PSINDEX by starting a buffered sort for each PSINDEX partition and by loading the index records in the E35 sort exit.
For example, if a PSINDEX has 12 partitions, and the PSORT keyword is specified, 12 buffered sorts are started for the PSINDEX.

If you specify MAXTASKS 2 PSORT, four subordinate address spaces for sort are created and three buffered sorts are started in each address space.

If you specify MAXTASKS 36 PSORT, 12 subordinate address spaces are created and a buffered sort is started in each address space.

Restrictions: The following restrictions apply to the parallel index sort:
  • For nn, specify an integer value that is greater than or equal to 2.
  • Do not specify partition names on the INDEX control statement.
  • The SORTFSZ control statement is ignored.
  • When IMS Index Builder is invoked by another utility, PSORT is ignored.

PSORT is an optional keyword.