How can I get started on the first execution of the new REORG utility to expand a database area?

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

Introduction:

There is a great deal of detailed documentation on the new (16.0 SP4) REORG utility. To fully understand what the utility does and how to use it, clients should take the time to carefully read sections 4.7 and 4.26 of the CA-IDMS Utilities manual.

This document contains a very brief description of the utility and provides sample JCL that was used to expand a dictionary DDLDML area from 5000 to 7000 pages.

Instructions:

The REORG utility unloads and reloads a CA IDMS database using parallel processing to reduce the amount of time it takes to reorganize data. In order to enable parallel operations, the utility divides the source and target databases into slices and groups of system-owned indexes. Each slice or index group can be processed (unloaded and reloaded) in parallel by concurrently executing jobs.

In this example, the utility is told to divide the DDLDML area into 4 slices.

This example also makes use of the CREATE DSMODEL utility statement that provides characteristics for dynamic allocation of the intermediate work files that are passed from one step to the next during the REORG.

For this example, the DMCL contains all database file DSN definitions so the only database DD/DSN in this example is the override for the new, larger database in the RELOAD step of the JCL. In addition to the JCL that you submit, the utility will dynamically submit jobs as needed using JCL that it will read from a dataset specified in your submitted JCL.

Please note that in this case, the UNLOAD and RELOAD steps read the JCL from a different member, due to the fact that the RELOAD JCL must specify the DSN override for the new file.

This REORG job was run with CV down. If CV is up, you must first vary all affected areas to Retrieval or Offline. Keep in mind that the procedure described here is one way to do this. It is the method that was used by CA IDMS Level 1 tech support to expand one of their dictionary areas.

Steps taken to expand APPLDICT.DDLDML from 5000 to 7000 pages using REORG:

  1. CREATE DMCL R160RELD as the Reload DMCL. This DMCL is an exact copy of the R160DMCL used by CV.

  2. ALTER the AREA and FILE definitions to define the new page and block ranges.

  3. GENERATE DMCL R160RELD, punch and link to DBA.LOADLIB.

  4. Allocate the new file and FORMAT using R160RELD.

  5. Allocate RORGCTL file for REORG (PS,F,4096,4096). For this run, the file was allocated as 30 tracks. Only 9 tracks were used. The file size will vary depending on what is being unloaded.

    * This is the Control file for the entire REORG process. If you are running the utility in several steps, this file, initially populated by the SETUP phase, must be available to all steps. A report can be run from this file at any point in the process to indicate the status of the REORG.

    * IMPORTANT NOTE: If any problems arise, be sure to retain the RORGCTL file as well as all files created by the utility.

  6. Create two LRECL 80 datasets or PDS members to contain the JCL used by the utility to dynamically submit jobs. These will be pointed to by the RORGJCL DD which is only coded in the main job JCL.

  7. Run the REORG utility. In this example, the utility was run in two steps. The first step stopped after UNLOAD and the second step stopped after CLEANUP. This was done to provide the DSN override for the new larger DDLDML file in the RELOAD phase.

  8. Run whatever programs you would use to verify database integrity.

  9. GENERATE DMCL R160DMCL to bring in the changes to the AREA and FILE affected by the REORG. Rename R160DMCL in the DBA.LOADLIB in case there is any reason to restore back to pre-REORG. Punch and Link the updated R160DMCL to DBA.LOADLIB.

  10. Rename or delete the old DDLDML dataset (typically a ".OLD" extension is added to the DSName to retain the old file temporarily). Rename the new dataset name to match what the CV & DMCL expect.

  11. Bring CV up or DCMT V DMCL NC to bring in the new definitions and again verify that the data in the area can be accessed successfully.

NOTE: Determining sizes for intermediate work files is difficult for a number of reasons and will not be discussed in this document. Review the "Sizing Work Files" topic in 4.26.2.6 of the CA-IDMS Utilities manual for information on this subject.

The main JCL submitted to expand the APPLDICT.DDLDML area:

//*------------------------------------------------------------------ 
//* UNLOAD THE DATABASE USING REORG 
//*------------------------------------------------------------------ 
//REOGUNLD EXEC PGM=IDMSBCF,REGION=0M 
//STEPLIB DD DSN=YOUR.R160SP4.DBA.LOADLIB,DISP=SHR 
// DD DSN=YOUR.R160SP4.LOADLIB,DISP=SHR 
//RORGCTL DD DISP=SHR,DSN=YOUR.PREFIX.RORGCTL 
//RORGJCL DD DISP=SHR,DSN= YOUR.PREFIX.JCLLIB(RORGUJCL) 
//SYSJRNL DD DUMMY 
//SYSIDMS DD * 
DMCL=R160DMCL 
DICTNAME=SYSDICT 
/* 
//SYSOUT DD SYSOUT=* 
//SORTMSG DD SYSOUT=* 
//SYSUDUMP DD SYSOUT=* 
//SYSLST DD SYSOUT=* 
//SYSIPT DD * 
CREATE DSMODEL W* 
DSN ' YOUR.PREFIX .&DD' 
UNIT SYSDA 
SPACE TRK(100,100) 
BLKSIZE 12004 
; 
REORG SEGMENT APPLDICT USING IDMSNWKU 
AREA DDLDML 
RELOAD INTO APPLDICT USING IDMSNWKU DMCL R160RELD 
DIVIDE PROCESSING 4 WAYS 
REUSE WORKFILES 
AS SORTEXIT 
STOP AFTER UNLOAD 
CREATE ALL WORKFILES 
SHARE 
NOTIFY 10 
; 
/* 
//*------------------------------------------------------------------ 
//* RELOAD THE DATABASE USING REORG 
//*------------------------------------------------------------------ 
//REOGRELD EXEC PGM=IDMSBCF,REGION=0M 
//STEPLIB DD DSN= YOUR.R160SP4.DBA.LOADLIB,DISP=SHR 
// DD DSN= YOUR.R160SP4.LOADLIB,DISP=SHR 
//RORGCTL DD DISP=SHR,DSN= YOUR.PREFIX .RORGCTL 
//RORGJCL DD DISP=SHR,DSN= YOUR.PREFIX .JCLLIB(RORGRJCL) 
//DICTDB DD DISP=SHR,DSN= YOUR.PREFIX.DDLDML.NEW 
//SYSJRNL DD DUMMY 
//SYSIDMS DD * 
DMCL=R160RELD 
DICTNAME=SYSDICT 
/* 
//SYSOUT DD SYSOUT=* 
//SORTMSG DD SYSOUT=* 
//SYSUDUMP DD SYSOUT=* 
//SYSLST DD SYSOUT=* 
//SYSIPT DD * 
CREATE DSMODEL W* DSN YOUR.PREFIX.&DD' 
UNIT SYSDA 
SPACE TRK(100,100) 
BLKSIZE 12004 
; 
REORG SUBMIT STOP AFTER CLEANUP;
/* 

Contents of the file defined by the main JCL statement
RORGJCL DD DISP=SHR,DSN= YOUR.PREFIX.JCLLIB(RORGUJCL)

//REOG JOB Job acct info,etc 
//REOGSTEP EXEC PGM=IDMSBCF,REGION=0M 
//STEPLIB DD DSN= YOUR.R160SP4 . DBA.LOADLIB,DISP=SHR 
// DD DSN= YOUR.R160SP4 .LOADLIB,DISP=SHR 
//RORGCTL DD DISP=SHR,DSN= YOUR.PREFIX. RORGCTL 
//SYSJRNL DD DUMMY 
//SYSIDMS DD * 
DMCL=R160DMCL 
DICTNAME=SYSDICT 
/* 
//SYSOUT DD SYSOUT=* 
//SORTMSG DD SYSOUT=* 
//SYSUDUMP DD SYSOUT=* 
//SYSLST DD SYSOUT=* 
//SYSIPT DD * 
REORG 

Contents of the file defined by the main JCL statement
RORGJCL DD DISP=SHR,DSN= YOUR.PREFIX.JCLLIB(RORGRJCL)
(Note that this JCL has the override for the new DDLDML file.)

//REOG JOB Job acct info,etc 
//REOGSTEP EXEC PGM=IDMSBCF,REGION=0M 
//STEPLIB DD DSN= YOUR.R160SP4 . DBA.LOADLIB,DISP=SHR 
// DD DSN= YOUR.R160SP4 .LOADLIB,DISP=SHR 
//RORGCTL DD DISP=SHR,DSN= YOUR.PREFIX. RORGCTL 
//DICTDB DD DISP=SHR,DSN=YOUR.PREFIX.DDLDML.NEW 
//SYSJRNL DD DUMMY 
//SYSIDMS DD * 
DMCL=R160RELD 
DICTNAME=SYSDICT 
/* 
//SYSOUT DD SYSOUT=* 
//SORTMSG DD SYSOUT=* 
//SYSUDUMP DD SYSOUT=* 
//SYSLST DD SYSOUT=* 
//SYSIPT DD * REORG 

Additional Information:

To fully understand what the utility does and how to use it, clients should take the time to carefully read sections 4.7 and 4.26 of the CA-IDMS Utilities manual.