REGENERATE ONEPASS command

From m204wiki
Revision as of 01:05, 28 February 2013 by Alex (talk | contribs) (Automatically generated page update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Summary

Privileges
User 0
Function
In the event of a media failure, for example, a disk head crash, a REGENERATE ONEPASS command recovers a Model 204 file by reapplying some or all of the updates that have been made to the file since the time of the last dump.

Syntax

REGENERATE ONEPASS FILE filename [FROM dumpname] [TO {LAST UPDATE | TO UPDATE nn | TO CHECKPOINT yy.ddd hh:mm:ss.th}]

For more than one file, specify REGENERATE ONEPASS only once; the remaining syntax is repeated for each file.

Where: REGENERATE ONEPASS processing executes only Pass One through the CCAGEN data set. If you must regenerate across a recovery process, two passes of the journal are required. You must build REGENERATE commands, not REGENERATE ONEPASS commands, which are invalid. See "REGENERATE: Recovering a file in two passes".

  • filename is the name of a Model 204 file that is one to eight characters long.

  • A FROM clause determines whether or not REGENERATE ONEPASS processing performs a restore:

    • If a FROM clause is present for a file, REGENERATE ONEPASS processing restores that file from the Model 204 dump specified in the clause.

    • If a FROM clause is not present for a file, REGENERATE ONEPASS processing assumes that the file was previously restored.

  • dumpname is the ddname of the dumped file, one to eight characters long, from which to recover.

  • The TO clause options listed in the table below identify the stopping point::

    TO clause options

    Option

    Applies updates to the file up to...

    LAST UPDATE

    All. This is the default.

    UPDATE nn

    And including the specified update.

    CHECKPOINT yy.ddd hh:mm:ss.th

    Specified checkpoint with a date-timestamp.

.

Syntax notes

When you regenerate multiple files, you must specify each file on a separate line. The line can begin in any column. The END command indicates the end of the list of files.

Examples

REGENERATE ONEPASS FILE DB1 FROM DUMPDB1 REGEN ONEPASS FILE DB1 FROM DUMPDB1 TO LAST UPDATE REGEN ONEPASS FILE DB1 FROM DUMPDB2 TO UPDATE 3 REGEN ONEPASS FILE MODFILE FROM DUMPMOD TO - CHECKPOINT 02.216 01:05:22.99 REGEN ONEPASS FILE DB1 FROM DUMPDB1 TO CHECKPOINT - 02.241 11:44:30.15 FILE DB2 FROM DUMPDB2 FILE DB3 FROM DUMPDB3 TO UPDATE 5 END

Usage notes

Note: The TO clause options for a REGENERATE ONEPASS command are restricted in scope when compared to the REGENERATE command, because no stopping point is known without reading the entire CCAGEN data set. (See REGENERATE: Recovering a file in two passes.)

An incorrect TO clause generates the following error message.

M204.1410: REGENERATE COMMAND REJECTED

The algorithm for identifying starting points, used whether or not a FROM clause is present, is to find the start of the first update unit with a time greater than the last updated time of the file being processed.

If REGENERATE ONEPASS processing opens a file for which it is not performing a restore, and if that file is marked physically inconsistent, REGENERATE ONEPASS processing for that file is discontinued.

When processing REGENERATE ONEPASS, Model 204 ends any update unit in progress and begins an update unit that cannot be backed out. For more information about Model 204 update units, see the Model 204 File Manager's Guide.

For a single-user (batch) Model 204 run, specify a REGENERATE ONEPASS command on User 0's command line. REGENERATE ONEPASS need not be the first command issued. User Language procedures and other batch functions can be intermixed with REGENERATE ONEPASS commands.