Previous Topic: RELOAD ParameterNext Topic: JCL Considerations


Usage

How to submit the RELOAD utility

You submit the RELOAD utility only through the batch command facility. You must run the batch command facility in local mode.

When to use RELOAD

Use the RELOAD utility to reload a database that has been unloaded by UNLOAD.

When reloading an SQL-defined database, the database files must be formatted using the FILE option of the FORMAT utility statement so that AREA and TABLE stamps are properly reloaded.

When not to use RELOAD

Do not use the RELOAD utility to load a new non-SQL-defined database; use the FASTLOAD utility.

Do not use the RELOAD utility to load a new SQL-defined database; use the LOAD utility.

Run RELOAD all at once or in steps

The reloading process has eight steps, which you can run one at a time or all together. Each step generates output for use by the next step. Four of the steps are sorts to prepare data for use by the following step.

You can run each step separately, in which case you can use your own sorting program. Alternatively, you can direct the RELOAD utility to do the sorting for you. If you run the steps as a single process, the RELOAD utility will do the sorting for you automatically.

When to run RELOAD in steps

The most common reason to run the RELOAD utility in steps is to cut the work into pieces, each piece requiring less time to run than the whole process.

You could also decide to run the RELOAD utility in steps in order to use your own sorting programs between the steps, or you can run the sort steps on a different machine than the one holding the database.

Mixed Page Groups

RELOAD cannot process mixed page groups and will issue an error message if mixed page groups are encountered. You must use multiple invocations of the utility to process different page groups.

RELOAD and ASF databases

If the RELOAD utility is to be run against an ASF data or definition area, see the CA IDMS ASF User Guide for more information.

Restarting IDMSDBL2, IDMSDBL3, or IDMSDBL4

If a problem arises while running IDMSDBL2 or IDMSDBL3, do not simply fix the cause of the problem and rerun the step. In addition to fixing the cause of the problem, you must do one of the following:

These steps change the database, and if a problem arises, you need to undo the changes before running a step over again.

If a non-data related problem occurs while running IDMSDBL4, you can restart the job without restoring. If the input file (SYS011) still exists, unlock the area and run the RELOAD utility from IDMSDBL4. Any updates previously performed by the run of IDMSDBL4 that abended will be overlayed by the updates in the restarted IDMSDBL4.

Note: For more information and help in deciding whether to run the RELOAD utility all at once or in steps, see the CA IDMS Database Administration Guide.

Data from UNLOAD is in SYS001, SYS002, SYS003, and RELDCTL

The information the RELOAD utility needs is in the SYS001, SYS002, SYS003, and RELDCTL files. UNLOAD knew these files as SYSPCH, SYS002, SYS003, and RELDCTL, respectively.

SORTEXIT and FROM/STEP

When using the FROM and STEP options with the SORTEXIT option, each pair of SORTn and DBLx steps are considered to be one step. If either half of the SORTn/DBLx is specified on a FROM or STEP option, processing will start with the SORTn step and the DBLx step will also be executed. For example:

SORTEXIT/REUSE WORKFILE restart considerations

Since SORTEXIT combines each SORTn step with the DBLx step that follows it, if a failure occurs in the DBLx step, a restart (if a restart is possible) must begin with the sort step and the input to the step will be resorted. Non-SORTEXIT mode will take longer to run but can be restarted after the sort in this case. Therefore, if restart time is more critical than normal runtime do not run the utility as a sortexit.

If the REUSE WORKFILE option is used with SORTEXIT, some input workfiles will be used as output files in the same step. Therefore, if these two options are used together and a failure occurs, the utility must be restarted from the beginning.

Workfile considerations for restarting a failed RELOAD

If the RELOAD command fails, depending on the reason for failure, restart the command at the failing step using the "FROM step-name" syntax. You can restart a step only if the input files to that step are intact and valid.

To prepare for a possible restart when running a one-step RELOAD, the intermediate work files should have a disposition that preserves the data set in the event of an abend, for example, "DISP=(NEW,CATLG,CATLG)."

To restart RELOAD at a particular step, the input files to that step must have a disposition to specify that the files already exist, for example, "DISP=OLD."

To determine which files were input to a given step see the "Intermediate Work File" tables under "JCL Considerations." Partially created output files should be deleted before you restart the job, and the original disposition should be used in the restart job, for example, "DISP=(NEW,CATLG,CATLG)."

The SYSPCH file contains sort parameter information for sort steps. It is an output file to IDMSDBLn steps but is not read unless restarting or running in step mode. So during a normal run the SYSPCH file should be treated as a normal output file, for example, "DISP=(NEW,CATLG,CATLG)." However, restarting is not as straightforward. If the previous job failed in an IDMSDBLx step, the SYSPCH file was an output file and should be deleted before restarting. But if the failure occurred in a SORTx step, the contents of the SYSPCH file should contain the same values that were input to the SORTx step. In this case the SYSPCH file should be preserved and defined as a SYS001 input file to the restart step.

When the SORTEXIT option is used, the SORTx and IDMSDBLx steps are combined. If a failure occurs in this mode, the SYSPCH file should normally be preserved and used as a SYS001 input file to the restart. However, there is a small window at the end of a IDMSDBLx step where the SYSPCH file is opened for output and new SORT parameters are written. If the job fails at this point, the entire SORTx/IDMSDBLx step must be restarted, but the SYSPCH file will not be valid as a SYS001 input file. In this case, the sort parameters must be recreated by hand or the job must be restarted at an earlier IDMSDBLx step if possible. One way to avoid this situation is to run in step mode when running SORTEXIT mode.

The RELDCTL data set is always an input file to the first step of a RELOAD whether being restarted or not.

REUSE WORKFILE considerations

Some tape volume management systems consider the reuse of a tape volume for second time output processing an error even in the same job and will not allow you to make this mistake. It results in rerunning the job over again without the REUSE option. You can sometimes avoid this by specifying a zero retention period for the tape output volume.

Intermediate work files

The following tables indicate which work files are created and read by the different utility steps depending on the use of the SORTEXIT and REUSE WORKFILE options.

Step

Input

Output

RELOAD: NOT sortexit mode and NOT reusing workfile

SORT1

SYS002

SYS004

IDMSDBL2

SYS004

SYS005 SYS006

SORT2

SYS003 SYS006

SYS007

IDMSDBLX

SYS007

SYS008

SORT3

SYS005 SYS008

SYS009

IDMSDBL3

SYS009

SYS010

SORT4

SYS010

SYS011

IDMSDBL4

SYS011

 

RELOAD: NOT sortexit mode and REUSING workfiles.

SORT1

SYS002

SYS004

IDMSDBL2

SYS004

SYS005 SYS006

SORT2

SYS003 SYS006

SYS004

IDMSDBLX

SYS004

SYS006

SORT3

SYS005 SYS006

SYS004

IDMSDBL3

SYS004

SYS005

SORT4

SYS005

SYS004

IDMSDBL4

SYS004

 

RELOAD: SORTEXIT mode and NOT reusing workfiles.

SORT1/IDMSDBL2

SYS002

SYS005 SYS006

SORT2/IDMSDBLX

SYS003 SYS006

SYS008

SORT3/IDMSDBL3

SYS005 SYS008

SYS010

SORT4/IDMSDBL4

SYS010

 

RELOAD: SORTEXIT mode and REUSING workfiles.

SORT1/IDMSDBL2

SYS002

SYS005 SYS006

SORT2/IDMSDBLX

SYS003 SYS006

SYS006

SORT3/IDMSDBL3

SYS005 SYS006

SYS005

SORT4/IDMSDBL4

SYS005

 

How RELOAD works

The RELOAD utility consists of the following steps, which you can run separately or as a single operation:

Step

Description

SORT1

Sorts the contents of SYS002.

IDMSDBL2

  • Populates the database by means of an area sweepbut does not connect any sets.
  • Prints statistics on the records written to the database.

    Note: Overflow statistics may be fewer than expected. In order to improve performance during a reload, IDMSDBL2 uses the dbkey of the previously stored record as a 'direct' dbkey if the next record to be stored has the same new target page. This reduces the number of overflow conditions.

SORT2

Sorts the contents of SYS003 and SYS006.

IDMSDBLX

  • Establishes pointers for each index in which each record participatesbut does not build the indexes in the database.

SORT3

Sorts the contents of SYS005 and SYS008.

IDMSDBL3

  • Establishes pointers for each chained set in which each recordparticipates (that is, builds the record prefix) but does not write the prefixes to the database.
  • Builds indexes in the database.

SORT4

Sorts the contents of SYS010.

IDMSDBL4

Inserts the record prefixes by performing a serial sweep of the database.

Each step has input and output

Each step uses the output from an earlier step and generates output for use by the next step. The following table lists the input and output for each step:

Step

Input

Output

Size

SORT1

  • SYS001 contains sort parameters from UNLOAD SYSPCH file
  • SYS002 contains the record information from UNLOAD

SYS004 contains the sorted record information

SYS004 record length = SYS002 record length from UNLOAD

IDMSDBL2

  • SYS004 from SORT1
  • RELDCTL file from UNLOAD utility
  • SYS005 contains member descriptors for chained sets
  • SYS006 contains member descriptors for user owned index sets
  • SYSPCH contains sort parameters
  • SYSLST contains statistics report

SYS005 record length = 32 bytes

SYS006 record length = 32 bytes

SORT2

  • SYS001 contains sort parameters from IDMSDBL2 SYSPCH*
  • SYS003 contains index information from UNLOAD
  • SYS006 contains member descriptors for user owned index sets from IDMSDBL2

SYS007 contains the sorted contents of SYS003 and SYS006

SYS007 record length = larger of RELOAD's SYS006 or UNLOAD's SYS003

IDMSDBLX

  • SYS007 contains sorted index information from SORT2
  • RELDCTL file from UNLOAD utility

SYS008 contains reformatted index information

SYS008 record length = same as SYS007

SORT3

  • SYS001 contains sort parameters from IDMSDBL2 SYSPCH*
  • SYS005 from IDMSDBL2
  • SYS008 from IDMSDBLX

SYS009 contains sorted index set descriptors

SYS009 record length = larger of RELOAD's SYS008 or IDMSDBL2's SYS005

IDMSDBL3

  • SYS009 from SORT3
  • RELDCTL file from UNLOAD utility
  • SYS010 contains prefix pointer information
  • SYSPCH contains sort parameters
  • SYSLST contains a statistics report

SYS010 record length = 28 bytes

SORT4

  • SYS001 contains sort parameters from IDMSDBL3 SYSPCH*
  • SYS010 from IDMSDBL3

SYS011 contains sorted prefix pointer information

SYS011 record length = same as SYS010 from prior step

IDMSDBL4

  • SYS011 from SORT4
  • RELDCTL file from UNLOAD utility

SYSLST contains messages on the results of the reload operation

 

* The sort parameters noted in the previous table are read from SYS001, as noted, only when you run the sort steps individually. If you run all steps together, or all steps from an intermediate restart (using FROM), the sort parameters are passed in-storage. If you restart from an abnormal termination, point the SYS001 file to the SYSPCH file of the last completed step.

Sort output after each step

If you run the RELOAD utility a step at a time, you must use the sort parameters in the SYSPCH file to sort the contents of the intermediate work files.

Sort the intermediate work files as follows:

Sort name

File to sort

Sort order

Sort on

Begins at

SORT1

SYS002

Descending

20 bytes

Byte 5

SORT2

SYS003 and SYS006

Ascending

24 bytes

Byte 5

SORT3

SYS005 and SYS008

Ascending

24 bytes

Byte 5

SORT4

SYS010

Ascending

12 bytes

Byte 5

Note: The generated sort parameters are insufficient for stand-alone sort programs under z/VSE. If you want to use your own sort program, you must add 'WORK=' parameters to specify more than one file whose contents are to be sorted.

DBLUEREX User Exit

RELOAD modules IDMSDBL2, IDMSDBL3, and IDMSDBL4 have the ability to call a user exit named DBLUEREX when processing errors are encountered. This exit will be called if an unexpected error status is returned from a call to CA IDMS for all three modules. The exit is also called by IDMSDBL3 if an error is encountered while processing the intermediate file containing records to rebuild the database's chain sets.

The DBLUEREX module must be linked with each IDMSDBLx module from which the user wishes it to be invoked. The modules must be coded so that they are able to run with AMODE=31 and RMODE=ANY so that they will match the modes of the IDMSDBL? modules. The following statements should be used to link DBLUEREX with the desired module(s).

INCLUDE LIB1(DBLUEREX)
INCLUDE LIB2(IDMSDBL?)
ENTRY #DDNHD

where the ? represents 2, 3, or 4 depending on the module to which the exit is being linked.

Upon entry to DBLUEREX, Register 1 will point to a list of three fullwords with the following contents. The last fullword in the list will have its high-order bit turned on to signal the end of the parameter list.

Offset

Description

x'00'

Address of an eight byte field containing the name of the module making the call.

x'04'

Address of the error status field in the run-unit's subschema control for calls from IDMSDBL2, IDMSDBL4, and IDMSDBL3 if a database error is encountered. This parameter will contain zeros if called by IDMSDBL3 when an error is encountered while processing the intermediate file containing records defining the database's chain sets.

x'08'

Address of the current input record being processed by the calling module.