NAMESWAP control statement

Specifies whether to automatically run post-reorganization processing after successful reorganization.

Post-reorganization processing includes data set name swapping and DBRC notification. For details about post-reorganization processing, see Post-reorganization processing.

This control statement is optional. The default is NAMESWAP=NO.

Read syntax diagramSkip visual syntax diagramNAMESWAP=NOYES
YES
Performs name swapping. Shadow data sets are renamed to the original data set names, that is, the sets of names of original and shadow data sets are swapped.

The following conditions must be satisfied to specify NAMESWAP=YES:

  • DBRC is active.
  • All databases being reorganized, including the secondary indexes, are registered to DBRC.
  • Names that are used for the shadow data sets for the primary database and primary index are not registered to DBRC.

If you specify NAMESWAP=YES, the names of the primary database and primary index data sets are swapped. The secondary index databases are swapped only if INDEXBLD=YES,NEW or PSINDEXBLD=YES,NEW is specified. Before a name swapping can occur, Reorganization Manager obtains exclusive authorization for the database from DBRC. (If you specified DBSHARE=NO, authorization has already been obtained.)

In the name swapping process, each original data set name, including the VSAM component name, is renamed to the original name plus the suffix .T. Therefore, the original name must contain no more than 42 characters. If it contains more, the job step ends without swapping names. You can see which data sets or VSAM components have been renamed and suffixed with .T, by checking the Result of Name Swapping report.

Renamed original data sets can be deleted or renamed to shadow data set names. For more information, see DISPOLDDS control statement.

You can also select the action that is taken in case a name swap failure occurs by using NAMESWAPFAIL control statements. For example, NAMESWAPFAIL=BACKOUT specifies that the data set names be restored to the names the data set had when the name swapping process started. For more information, see NAMESWAPFAIL control statement.

If name swapping succeeds, Reorganization Manager issues DBRC NOTIFY.REORG commands for the reorganized database and the primary index. If you specify INDEXBLD=YES or PSINDEXBLD=YES, the NOTIFY.REORG command is also issued for each secondary index.

NO
Name swapping is not done.

If you run the job with NAMESWAP=NO, you are responsible for ensuring that the name swapping takes place after the reorganization. For details, see Post-reorganization processing.

Notes:
  • Whether you specify NAMESWAP=NO or YES, the original database data sets and the shadow database data sets must be cataloged in the same MVS™ catalog. IBM® recommends that you use the same high-level qualifier for both sets of data set names.
  • Even if an HDAM or a HIDAM database has logical relationships, you can specify NAMESWAP=YES. For external logical relationships, you must run IMS Prefix Resolution and Prefix Update utilities after Smart Reorg utility job steps. For post-reorganization processing for these databases, see Post-reorganization processing for database with logical relationships.
  • If you specify INDEXBLD=YES,NEW or PSINDEXBLD=YES,NEW, be careful when name swapping is done for the secondary indexes. For more information, see Secondary indexes.
  • For a HALDB, you can have the Smart Reorg utility do post-reorganization processing automatically by specifying the NAMESWAP=YES control statement, even if the database has logical relationships with another database.
  • If ILDSBLD=NO is specified or no ILE is created when you reorganize HALDB partitions, no shadow ILDS is used. In this case, ILDS is excluded from the name swapping process. If ILDSBLD=YES and NAMESWAP=YES are specified and one of the following conditions is satisfied, the name swapping between the original ILDS and the shadow ILDS is done for each HALDB partition that is to be reorganized:
    • Dynamic allocation of shadow data sets is designated and all shadow ILDSs exist.
    • The shadow ILDSs of all partitions that are to be reorganized are specified in the JCL stream.
  • For a HALDB partition with active DBDS in the M-through-V and Y side, the shadow data sets are renamed to the data set names of A-through-J and X side, and the original data sets remain as they are. DBRC command CHANGE.DB OLRDBDS(A) is issued after name swapping.