SORT control statement

Specifies whether to run the physical sequential sort processing before loading. This specification is valid only for HDAM and PHDAM databases.

The HDAM or PHDAM unloaded data must be in the order of hexadecimal value bbbbbbrr that represents the result of randomizing module conversion. bbbbbb is the block number and rr is the RAP number. If it is not in that order due to such reasons as changing randomizer, you must specify SORT=YES or SORT=COND.

This control statement is optional. If you do not specify this control statement, SORT=NO is used.

Read syntax diagram
          .-NO---.   
>>-SORT=--+-YES--+---------------------------------------------><
          '-COND-'   

NO
Does not run the sort process.
YES
Runs physical sequential sorting before the reload process. It sorts in the physical sequence of the block, then the RAP numbers.
COND
Runs the physical sequential sorting depending on conditions. To use this option, the input unloaded data set must be created by IMS™ High Performance Unload with the CHECKREC=YES option and the format of the unloaded data set must be in the HD format or in the short header format.

The physical sequential sorting is done if any of the following is changed between the unload process and the reload process:

  • The randomizing module name
  • The number of root anchor points (RAP)
  • The maximum BLK/CI number in RAA
  • The starting position of the root key
  • The length of the root key
  • Whether the root segment has key sequence field
  • Database organization is changed from (P)HIDAM to (P)HDAM

The physical sequential sorting is done whenever the following conditions are satisfied:

  • The input unloaded data set was not created by IMS HP Unload with the CHECKREC=YES option.
  • The input unloaded data set was created in the communication industry standard format.
  • The input unloaded data sets are concatenated.
  • The Load API function is used.
Requirement: For the following changes, you must specify SORT=YES instead of SORT=COND, because these changes cannot be detected by IMS HP Load with SORT=COND:
  • The logic of the randomizing module
  • The name or logic of the HALDB partitions selection exit routine
  • The partition selection string or the high key values
Restrictions:
  • When processing HALDBs, this statement is used exclusively with the USERHDR and the USERHDRX control statements.
  • The key value that is sorted by SORT=YES or SORT=COND cannot be changed by the user exit routine.
  • The compressed root key cannot be sorted. Specify DECOMPRESS=YES in the IMS HP Unload utility to expand the compressed key.
Note: If a workspace of DFSORT needs to be adjusted, specify the SORTWKnn DD statements.
Tip: The default value of the SORT control statement can be changed. For details, see Setting installation default options.