What are the steps to run a basic unload-reload?

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

Introduction:

This technical document describes the steps necessary for a basic UNLOAD/RELOAD operation.

It should be reviewed in conjunction with the UNLOAD and RELOAD sections in the CA IDMS Utilities manual.

Instructions:

1. Take a back-up. You should back up the dictionary, the SYSTEM catalog, the area(s) you intend to unload, and any dependent areas. (Dependent areas are those which have cross-area sets to the target areas, and get updated as part of the reload process.)

2. Run an IDMSDBAN to verify the integrity of the database.

3. Run a PRINT SPACE of the area(s) you are unloading in order to verify the output with the same utility run after the process.

4. Run the CLEANUP utility to remove any LOGICALLY DELETED records. This must be run against the area(s) being unloaded and any dependent areas.

5. In the SYSTEM catalog, update the page ranges of the areas you are unloading to reflect the new page ranges.

6. Create a new DMCL with a different name from the existing DMCL which will include the changed area definition(s) from step 5.
To do this, while connected to SYSTEM in OCF, type DIS DMCL dmclname AS SYN; and hit ENTER.
In the output, erase the first two lines, change every instance of dmclname to the name you want to call your new DMCL (we suggest RELDDMCL), and hit ENTER again.
Next, clear the screen (hit ESCAPE).
Now type GENERATE DMCL RELDDMCL; to generate your new "reload" DMCL.

(Note: it is a good practice to permanently maintain this second DMCL “RELDDMCL”. At normal times, it will be exactly the same as your real DMCL. When you are conducting an UNLOAD/RELOAD, it describes the physical definition of the new database area(s).)

7. Punch and link RELDDMCL to your DBA.LOADLIB. Note that at this stage, the live DMCL load module still contains the "old" page ranges.
Both the live DMCL and RELDDMCL must be available to both the UNLOAD and the RELOAD.

8. Allocate new datasets for the new files with the appropriate file sizes. Ideally name them the same as the existing files with a suffix of ".NEW".

9. FORMAT the new files, being sure to use the new DMCL and pointing to the new database files in the JCL. For example:

//IDMSBCF EXEC PGM=IDMSBCF,REGION=0M
//STEPLIB  DD DSN=your.DBA.LOADLIB,DISP=SHR
//         DD DSN=your.CUSTOM.LOADLIB,DISP=SHR
//         DD DSN=your.idms.CAGJLOAD,DISP=SHR
//SYSLST   DD SYSOUT=*
//SYSPCH   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTMSG  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//J1JRNL   DD DUMMY
//J2JRNL   DD DUMMY
//J3JRNL   DD DUMMY
//SYSJRNL  DD DUMMY
//**  include datasets for your newly defined database files, for example:
//ddname1   DD DSN=your.database.file1.NEW,DISP=SHR
//ddname2   DD DSN=your.database.file2.NEW,DISP=SHR
...
//ddnameN   DD DSN=your.database.fileN.NEW,DISP=SHR
//SYSIDMS   DD *
DMCL=RELDDMCL
LOCAL=ON
ECHO=ON
//SYSIPT   DD *
CONNECT TO SYSTEM;
FORMAT FILE segment-name.file1;
FORMAT FILE segment-name.file2;
FORMAT FILE segment-name.fileN;
/*

10. At this point you must make the database unavailable for update to any user applications. This means either VARYing all the areas (both target and dependent) OFFLINE or RETRIEVAL, or shutting down the CV.

11. Run the unload step. The dmclname specified in SYSIDMS must be the live DMCL - the one with the old page ranges. Sample JCL:-

//UNLOAD  EXEC PGM=IDMSBCF,REGION=0M
//STEPLIB  DD DSN=your.DBA.LOADLIB,DISP=SHR
//         DD DSN=your.CUSTOM.LOADLIB,DISP=SHR
//         DD DSN=your.idms.CAGJLOAD,DISP=SHR
//SYSPCH   DD DSN=your.UNLD.SYSPCH,
//         DISP=(NEW,CATLG,DELETE),SPACE=(TRK,1),
//         UNIT=SYSDA,
//         DCB=(LRECL=80,BLKSIZE=80,RECFM=F,DSORG=PS)
//SYS002   DD DSN=your.UNLD.SYS002,
//         DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(1000,10)),
//         UNIT=SYSDA,
//         DCB=(BLKSIZE=4276,RECFM=VB,DSORG=PS)
//SYS003   DD DSN=your.UNLD.SYS003,
//         DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(10,10)),
//         UNIT=SYSDA,
//         DCB=(BLKSIZE=4276,RECFM=VB,DSORG=PS)
//RELDCTL  DD DSN=your.UNLDRELD.RELDCTL,
//         DISP=(NEW,CATLG,DELETE),SPACE=(TRK,1),
//         UNIT=SYSDA,
//         DCB=(LRECL=60,BLKSIZE=600,RECFM=FB,DSORG=PS)
//SYSLST   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTMSG  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSJRNL  DD DUMMY
//SYSIDMS  DD *
DMCL=dmclname
/*
//SYSIPT   DD *
   CONNECT TO SYSTEM;
   UNLOAD SEGMENT segment-name
          USING subschema-name
                AREA area-name-1,
                     area-name-2,
                     ...
                     area-name-n
           RELOAD INTO segment-name
           USING subschema-name
           DMCL RELDDMCL;

12. Run the reload step. Sample JCL:-

//RELOAD  EXEC PGM=IDMSBCF,REGION=0M
//STEPLIB  DD DSN=your.DBA.LOADLIB,DISP=SHR
//         DD DSN=your.CUSTOM.LOADLIB,DISP=SHR
//         DD DSN=your.idms.CAGJLOAD,DISP=SHR
//SYS001   DD DSN=your.UNLD.SYSPCH,DISP=SHR
//SYS002   DD DSN=your.UNLD.SYS002,DISP=SHR
//SYS003   DD DSN=your.UNLD.SYS003,DISP=SHR
//RELDCTL  DD DSN=your.UNLDRELD.RELDCTL,DISP=SHR
//SYS004   DD DSN=your.RELD.SYS004,
//         DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(700,10)),
//         UNIT=SYSDA,
//         DCB=(BLKSIZE=4276,RECFM=VB,DSORG=PS)
//SYS005   DD DSN=your.RELD.SYS005,
//         DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(700,10)),
//         UNIT=SYSDA,
//         DCB=(LRECL=4272,BLKSIZE=4276,RECFM=VB,DSORG=PS)
//SYS006   DD DSN=your.RELD.SYS006,
//         DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(700,10)),
//         UNIT=SYSDA,
//         DCB=(LRECL=4272,BLKSIZE=4276,RECFM=VB,DSORG=PS)
//SYS007   DD DSN=your.RELD.SYS007,
//         DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(700,10)),
//         UNIT=SYSDA,
//         DCB=(LRECL=4272,BLKSIZE=4276,RECFM=VB,DSORG=PS)
//SYS008   DD DSN=your.RELD.SYS008,
//         DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(700,10)),
//         UNIT=SYSDA,
//         DCB=(LRECL=4272,BLKSIZE=4276,RECFM=VB,DSORG=PS)
//SYS009   DD DSN=your.RELD.SYS009,
//         DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(700,10)),
//         UNIT=SYSDA,
//         DCB=(LRECL=4272,BLKSIZE=4276,RECFM=VB,DSORG=PS)
//SYS010   DD DSN=your.RELD.SYS010,
//         DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(700,10)),
//         UNIT=SYSDA,
//         DCB=(LRECL=4272,BLKSIZE=4276,RECFM=VB,DSORG=PS)
//SYS011   DD DSN=your.RELD.SYS011,
//         DISP=(NEW,CATLG,DELETE),SPACE=(TRK,(700,10)),
//         UNIT=SYSDA,
//         DCB=(LRECL=4272,BLKSIZE=4276,RECFM=VB,DSORG=PS)
//SYSPCH   DD DSN=&&SORTPCH,DISP=(NEW,PASS),
//         UNIT=SYSDA,SPACE=(TRK,(1,1)),
//         DCB=(LRECL=80,BLKSIZE=80,RECFM=FB,DSORG=PS)
//**  include datasets for your newly defined database files, for example:-
//ddname1   DD DSN=your.database.file1.NEW,DISP=SHR
//ddname2   DD DSN=your.database.file2.NEW,DISP=SHR
...
//ddnameN   DD DSN=your.database.fileN.NEW,DISP=SHR
//SYSLST   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SORTMSG  DD SYSOUT=*
//SORTWK01 DD UNIT=SYSDA,SPACE=(TRK,(100)),DSN=&&SW1,
//         DISP=(NEW,PASS)
//SORTWK02 DD UNIT=SYSDA,SPACE=(TRK,(100)),DSN=&&SW2,
//         DISP=(NEW,PASS)
//SORTWK03 DD UNIT=SYSDA,SPACE=(TRK,(100)),DSN=&&SW3,
//         DISP=(NEW,PASS)
//SORTWK04 DD UNIT=SYSDA,SPACE=(TRK,(100)),DSN=&&SW4,
//         DISP=(NEW,PASS)
//SORTWK05 DD UNIT=SYSDA,SPACE=(TRK,(100)),DSN=&&SW5,
//         DISP=(NEW,PASS)
//SORTWK06 DD UNIT=SYSDA,SPACE=(TRK,(100)),DSN=&&SW6,
//         DISP=(NEW,PASS)
//SYSUDUMP DD SYSOUT=*
//SYSJRNL  DD DUMMY
//SYSIDMS  DD *
DMCL=RELDDMCL
USERCAT=OFF
/*
//SYSIPT   DD *
CONNECT TO SYSTEM;
RELOAD;

13. Take a backup of the newly reloaded target areas/files and the dependent areas/files.

14. Rename the old DMCL load module (dmclname) to something else in case you need to recover it.

15. Re-generate, punch & link the original DMCL (dmclname) so that it will now contain the updated area definitions.

16. At this point you need to rename the physical database files so that the new files will be in use by the CV. This can be done either by cycling the CV or de-allocating and re-allocating the files. If you have already shut the CV down (as mentioned in point 10 above) you may as well use that method. If you have not already shut it down, you should decide now whether or not to do that or use the de-allocate/allocate method.

If you decide to use the shutdown method, go to step 23.

17. For each of the areas and files which constitute the target areas, you must do the following:-

DCMT VARY AREA segment-name.area-name OFFLINE
DCMT VARY FILE segment-name.file-name CLOSE
DCMT VARY FILE segment-name.file-name DEALLOCATE

18. Rename all of the physical files of the target areas from "your.database.fileX" to "your.database.fileX.OLD".

19. Rename all of the new physical files of the target areas from "your.database.fileX.NEW" to "your.database.fileX".

20. Refresh the DMCL with the command DCMT VARY DMCL NEW COPY and reply to the question about continuing with Y.

21. For each of the areas and files which constitute the target areas, you must do the following:-

DCMT VARY FILE segment-name.file-name ALLOCATE
DCMT VARY FILE segment-name.file-name OPEN
DCMT VARY AREA segment-name.area-name ONLINE

22. Go to step 26.

23. Shut the CV down.

24. Perform the rename steps identified in steps 18 and 19.

25. Start the CV up again.

26. Depending on how the areas are defined in the DMCL, it may be necessary at this point to VARY them ONLINE with DCMT (both target and dependent areas).

27. At this point, the UNLOAD/RELOAD is complete.

You may choose to VARY the areas OFFLINE and re-run the IDMSDBAN and PRINT SPACE jobs to check for consistency with the results from steps 2 and 3.

Additional Information:

CA IDMS Utilities Guide: “Utility Statements” chapter, sections “UNLOAD”. “RELOAD”, “CLEANUP”, PRINT SPACE. “Utility Programs” chapter, section “IDMSDBAN”.

 

CA IDMS System Tasks and Operator Commands: “DCMT VARY Commands” chapter, sections “DCMT VARY AREA” and “DCMT VARY FILE”.