SPACEALLOC control statement

Specifies whether to delete and allocate DASD space for each shadow data set within the IMS Database Reorganization Expert job step.

This control statement is optional. This control statement is used if DYNALLOC=(,YES,) or DYNALLOC=(,,YES) is specified.

The default is SPACEALLOC=NO. If SPACEALLOC=NO is used, an IDCAMS step to allocate the DASD space is needed in separate from the IMS Database Reorganization Expert step.

If you specify CONDREORG=YES,DIAGONLY, the SPACEALLOC control statement is ignored and has no effect.

Read syntax diagramSkip visual syntax diagramSPACEALLOC=NOYES,FORCE

If you specify SPACEALLOC=YES, each shadow data set can be deleted and allocated within the Smart Reorg utility job step. You can specify the IDCAMS commands in the DDEFPDS2 data set or the HPSGAMSA data set, otherwise the Smart Reorg utility generates the commands automatically.

Using the DDEFPDS2 data set to supply IDCAMS commands
If you specify the DDEFPDS2 DD statement, which specifies the partitioned data set that contains IDCAMS commands for shadow data sets allocation, the Smart Reorg utility passes the commands to the IDCAMS program. The name of each PDS member must be the same as the DD name of the original data set.

The names of shadow data sets do not need to be in the form of original_data_set_name + suffix, they can have any desired names.

For HALDBs, the name of each PDS member must be the same as the DD name of the A-side data sets even when M-side data sets are active.

The following example shows IDCAMS control statements specified in a PDS member:
DELETE (shadow.database.data-set.name) 
SET MAXCC=0
DEFINE CLUSTER(NAME(shadow.database.data-set.name)...) 
or 
ALLOCATE DSNAME('shadow.database.data-set.name')...

In this example, the command to delete the old temporary data set (with suffix .T) is not included because the command will be added automatically.

If not all the members of the database data sets are present in the DDEFPDS2 data set, the Smart Reorg utility generates IDCAMS commands for the missing database data sets.
Using the HPSGAMSA data set to supply IDCAMS commands
If you specify the HPSGAMSA DD statement, which specifies the data set that contains IDCAMS commands for shadow data sets allocation, the Smart Reorg utility passes the commands to the IDCAMS program.

The names of shadow data sets must be in the form of original_data_set_name + suffix, where the suffix character is the character specified on the DYNALLOC control statement.

Notes:
  • If the IDCAMS returns a non-zero condition code, the Smart Reorg utility ends the reorganization processing. Specify SET MAXCC=0 after the DELETE command in case the used shadow data set does not exist.
  • If the HPSGAMSA data set contains many IDCAMS ALLOCATE commands, IDCAMS processing might end without allocating some shadow database data sets. When this happens, IDCAMS message IKJ56220I is printed in the Result of Shadow Space Allocation report to alert data set allocation failures. If the HPSGAMSA data set contains many ALLOCATE commands, specify the DYNAMNBR parameter on the EXEC statement to prevent data set allocation failures.

    Example:

    //REORG EXEC PGM=HPSGMAIN,PARM='DBD=dbdname,DBRC=Y',DYNAMNBR=999
Enabling automatic shadow space allocation
If both the DDEFPDS2 DD statement and the HPSGAMSA DD statement are not specified, the Smart Reorg utility automatically attempts to delete and allocate the DASD space for each shadow data set based on the attributes of its original data set. For volume list and the SMS classes, see Notes.

If DYNALLOC=(,,YES) is specified with INDEXBLD=YES,NEW or PSINDEXBLD=YES,NEW, the commands for the shadow secondary index data sets are included.

For HALDBs, the commands for the shadow ILDS are included unless ILDSBLD=NO is specified.

If NAMESWAP=YES, the commands to delete the old temporary data set with suffix .T are added.

If you specify SPACEALLOC=YES, and a new shadow data set is already allocated or the VSAM shadow data set with the REUSE option remains1, the shadow data set is used without reallocating.

If you specify SPACEALLOC=YES,FORCE, each shadow data set is automatically deleted and allocated even if a new or reusable shadow data set is allocated before the Smart Reorg Driver job step.

Result of this processing is shown in Result of Shadow Space Allocation report.

Notes:
  • If a new or reusable data set with the shadow name is not found, the Smart Reorg utility generates the commands for allocation.
    • If the original data set is not SMS-managed and the old data set with the shadow name remains1, the volume list is derived from the old shadow data set. If the old shadow data set is not found, the volume list is derived from the original data set. You must take care whether there is enough available space on the volumes.
    • If the original data set is SMS-managed, the number of volumes and the SMS classes are derived from the original data set and the volumes are assigned by SMS.
  • To encrypt data sets by using z/OS® data set encryption, the original data sets must be associated to a SMS data class that has an encryption key label.
  • The primary space quantity for an OSAM shadow data set is determined by adding up the space allocated in the first three extents of the original data set. Therefore, the space allocated for the shadow data set might not match the space that was specified for the original data set.
  • If you specify CONDREORG=YES and if the Smart Reorg utility did not reorganize the database, shadow data sets are not deleted or allocated even if you specify SPACEALLOC=YES or SPACEALLOC=YES,FORCE.
Restrictions:
  • The Smart Reorg utility does not automatically generate commands for the following data sets:
    • Shadow data set if its original is an OSAM multi-volume data set and the volumes are not SMS-managed. If the volumes are SMS-managed, the Smart Reorg utility attempts to allocate the shadow data set. The SMS storage class must have the guaranteed space attribute.
    • Output secondary index data set if INDEXBLD=YES,CURRENT or PSINDEXBLD=YES,CURRENT.
    • Output secondary index data set if INDEXBLD=YES,NEW or PSINDEXBLD=YES,NEW and its original data set is not found.
  • Migrating from an OSAM data set to an OSAM LDS data set using the automatic shadow space allocation feature is not supported. You must allocate the shadow OSAM LDS data set by specifying SPACEALLOC=NO, or by using the HPSGAMSA DD statement or the DDEFPDS2 DD statement.
1 If DISPOLDDS=NEWSHADOW is specified, the input original data sets are renamed to the shadow names during the name swapping and the data sets with the shadow names remain.