REGENERATE command: Difference between revisions
No edit summary |
m (Add USING ddname) |
||
(13 intermediate revisions by 3 users not shown) | |||
Line 7: | Line 7: | ||
</dl> | </dl> | ||
==Syntax== | ==Syntax== | ||
<p class="syntax"><b>REGEN</b>ERATE FILE <span class="term">filename</span> [FROM <span class="term">dumpname</span> | IGNORE] | <p class="syntax"><b>REGEN</b>ERATE [USING <span class="term">ddname</span>] FILE <span class="term">filename</span> [FROM <span class="term">dumpname</span> | IGNORE] | ||
[TO {<u>LAST UPDATE</u> [BEFORE <span class="term">yy.ddd hh:mm:ss.th</span>] | [TO {<u>LAST UPDATE</u> [BEFORE <span class="term">yy.ddd hh:mm:ss.th</span>] | ||
| LAST CHECKPOINT [BEFORE <span class="term">yy.dd hh:mm:ss.th</span>] | | LAST CHECKPOINT [BEFORE <span class="term">yy.dd hh:mm:ss.th</span>] | ||
| UPDATE <span class="term"> | | UPDATE <span class="term">number</span> OF <span class="term">yy.ddd hh:mm:ss.th</span> | ||
| CHECKPOINT <span class="term">yy.ddd hh:mm:ss.th</span>}] | | CHECKPOINT <span class="term">yy.ddd hh:mm:ss.th</span>}] | ||
</p> | </p> | ||
Line 17: | Line 17: | ||
<b>Where:</b> | <b>Where:</b> | ||
<ul> | <ul> | ||
<li> | |||
<p><var class="term">ddname</var> allows an alternate ddname to be used for the input journal to be used by REGENERATE. It is one to eight characters long and defaults to <span class="term">CCAGEN</span> if not specified</p> | |||
</li> | |||
<li> | <li> | ||
<p><var class="term">filename</var> is the name of a <var class="product">Model 204</var> file that is one to eight characters long.</p> | <p><var class="term">filename</var> is the name of a <var class="product">Model 204</var> file that is one to eight characters long.</p> | ||
Line 46: | Line 50: | ||
<table> | <table> | ||
<tr> <th> | <tr class="head"> <th> | ||
<p>Option</p> | <p>Option</p> | ||
</th> <th> | </th> <th> | ||
Line 52: | Line 56: | ||
</th> </tr> | </th> </tr> | ||
<tr> <th><var | <tr> <th><var>LAST UPDATE</var></th> <td>All. This is the default. </td> </tr> | ||
</var></th> <td>All. This is the default. </td> </tr> | |||
<tr> <th><var | <tr> <th><var>LAST CHECKPOINT</var></th> | ||
<td>Last checkpoint on the input journal. | |||
</var></th> <td | |||
</td> </tr> | </td> </tr> | ||
<tr> <th nowrap><var> | <tr> <th nowrap><var>UPDATE <i>number</i> OF <i>id</i></var></th> <td>And including the update specified by <i>number</i> and <i>id</i>. The ID is the date/time stamp from the END OF UPDATE message, specified in the form: yy.ddd hh:mm:ss.th.</td> </tr> | ||
< | |||
</var></th> <td>And including the specified | |||
<tr> <th><var | <tr> <th><var>CHECKPOINT <i>id</i></var></th> | ||
<td>Specified checkpoint. The ID is specified in the form: yy.ddd hh:mm:ss.th. </td> </tr> | |||
</var></th> <td | |||
</td> </tr> | |||
</table> | </table> | ||
</li> | </li> | ||
Line 100: | Line 94: | ||
</p> | </p> | ||
<p class="note"><b>Note:</b> Blank lines are not valid between the REGENERATE and END command.</p> | <p class="note"><b>Note:</b> Blank lines are not valid between the REGENERATE and END command.</p> | ||
<p class="code">REGEN FILE ABC FROM DUMPABC /* First run */ | <p class="code">REGEN FILE ABC FROM DUMPABC /* First run */ | ||
. | . | ||
. | . | ||
REGEN FILE ABC IGNORE /* A later run */ | REGEN FILE ABC IGNORE /* A later run */ | ||
</p> | </p> | ||
==Usage notes== | ==Usage notes== | ||
<p>The REGENERATE command lets the system manager use the <var class="product">Model 204</var> media recovery feature to regenerate one or more files. A REGENERATE command is issued in case of a loss of storage integrity caused by a hard system error such as a disk head crash.</p> | <p>The REGENERATE command lets the system manager use the <var class="product">Model 204</var> media recovery feature to regenerate one or more files. A REGENERATE command is issued in case of a loss of storage integrity caused by a hard system error such as a disk head crash.</p> | ||
Line 120: | Line 115: | ||
<p>The second run begins where the previous REGEN processing ended and applies the second journal updates.</p> | <p>The second run begins where the previous REGEN processing ended and applies the second journal updates.</p> | ||
<p class="note"><b>Note:</b> If you omit a journal, <var class="product">Model 204</var> does not report this to you. Therefore, use the IGNORE option with care.</p> | <p class="note"><b>Note:</b> If you omit a journal, <var class="product">Model 204</var> does not report this to you. Therefore, use the IGNORE option with care.</p> | ||
====Using the TO UPDATE option==== | |||
You can specify the TO UPDATE option for a single or multiple file run. | |||
<p>If TO UPDATE <var class="term">nn</var> OF <var class="term">id</var> is specified, it must appear only on the first FILE statement, and no other ‘TO’ options are allowed on subsequent files.</p> | |||
(In Model 204 version 7.6, the new message: <code>M204:1664 "TO UPDATE" only allowed on first line of REGENerate</code> appears any time more than one TO UPDATE is specified, or if TO UPDATE is specified on a line other than the first.) | |||
<p>All additional files are recovered as though they each specified the same 'TO UPDATE' option. The <var class="term">id</var>' timestamp is the END OF TRANSACTION timestamp. Once the 'end of transaction' is reached, further processing stops, all inflight transactions are backed out, and RC=0 is set.</p> | |||
<p>If the update is not found in the journal, then the run stops immediately after pass 1. RC=4 is set. This message is displayed for each file: </p> | |||
<p class="code">M204.1409: MISSING STOPPING POINT FOR FILE <var class="term">filename</var></p> | |||
And this message is also displayed: | |||
<p class="code">M204.1435: Error during regenerate</p> | |||
====Using REGENERATE with multiple files==== | ====Using REGENERATE with multiple files==== | ||
<p>The number of files you can regenerate in a single run depends upon the settings of these parameters: [[NDIR parameter|NDIR]] (number of directory entries) and [[NFILES parameter|NFILES]] (number of file areas).</p> | <p>The number of files you can regenerate in a single run depends upon the settings of these parameters: [[NDIR parameter|NDIR]] (number of directory entries) and [[NFILES parameter|NFILES]] (number of file areas).</p> | ||
[[Category:Commands]] | [[Category:Commands]] |
Latest revision as of 20:06, 20 November 2024
Summary
- Privileges
- User 0
- Function
- In the event of a media failure, for example, a disk head crash, a REGENERATE 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 [USING ddname] FILE filename [FROM dumpname | IGNORE] [TO {LAST UPDATE [BEFORE yy.ddd hh:mm:ss.th] | LAST CHECKPOINT [BEFORE yy.dd hh:mm:ss.th] | UPDATE number OF yy.ddd hh:mm:ss.th | CHECKPOINT yy.ddd hh:mm:ss.th}]
For more than one file, specify REGENERATE only once; the remaining syntax is repeated for each file.
Where:
-
ddname allows an alternate ddname to be used for the input journal to be used by REGENERATE. It is one to eight characters long and defaults to CCAGEN if not specified
-
filename is the name of a Model 204 file that is one to eight characters long.
-
A FROM clause determines whether or not REGENERATE processing performs a restore:
-
If a FROM clause is present for a file, REGENERATE processing restores that file from the Model 204 dump specified in the clause.
-
If a FROM clause is not present for a file, REGENERATE 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.
-
IGNORE lets REGENERATE processing bypass the file parameter list (FPL) update timestamps, so you can run REGEN processing with one CCAGEN at a time, instead of requiring you to concatenate the CCAGEN files.
-
The TO clause options listed in the table below identify the stopping point:
Option
Applies updates to the file up to...
LAST UPDATE All. This is the default. LAST CHECKPOINT Last checkpoint on the input journal. UPDATE number OF id And including the update specified by number and id. The ID is the date/time stamp from the END OF UPDATE message, specified in the form: yy.ddd hh:mm:ss.th. CHECKPOINT id Specified checkpoint. The ID is specified in the form: yy.ddd hh:mm:ss.th. -
A BEFORE clause specifies a nonspecific stopping point. The BEFORE clause is an alternative to specifying an exact checkpoint ID or update unit number and ending date and time from an audit trail.
If you specify a BEFORE clause, Pass One of REGENERATE processing determines the last complete update or checkpoint before the time specified. Pass Two of REGENERATE processing stops reapplying file updates when it reaches the stopping point identified in Pass One.
Syntax notes
When multiple files are regenerated, each file must be specified on a separate line. The line can begin in any column. The END keyword indicates the end of the list of files.
Examples
REGENERATE FILE DB1 FROM DUMPDB1 REGEN FILE DB1 FROM DUMPDB1 TO LAST UPDATE REGEN FILE DBAUDIT FROM DUMP01 TO LAST - CHECKPOINT REGEN FILE DB1 FROM DUMPDB2 TO UPDATE 3 - OF 88.216 06:28:42.98 REGEN FILE MODFILE FROM DUMPMOD TO - CHECKPOINT 88.216 01:05:22.99 REGEN FILE DB1 FROM DUMPDB1 TO LAST CHECKPOINT FILE DB2 FROM DUMPDB2 FILE DB3 FROM DUMPDB3 TO UPDATE 5 OF - 88.008 05:19:41.27 END
Note: Blank lines are not valid between the REGENERATE and END command.
REGEN FILE ABC FROM DUMPABC /* First run */ . . REGEN FILE ABC IGNORE /* A later run */
Usage notes
The REGENERATE command lets the system manager use the Model 204 media recovery feature to regenerate one or more files. A REGENERATE command is issued in case of a loss of storage integrity caused by a hard system error such as a disk head crash.
The algorithm for identifying starting points, used whether or not a FROM clause is present, is to find the first start of an update unit with a time greater than the last updated time of the file being processed.
If REGENERATE processing opens a file for which it is not performing a restore, and if that file is marked physically inconsistent, REGENERATE processing for that file is discontinued.
When it processes REGENERATE, Model 204 ends any update unit in progress and begins a no-back out-allowed update unit. For more information about Model 204 update units, see Update units and transactions.
For a single-user (batch) Model 204 run, specify a REGENERATE command on User 0's command line. REGENERATE need not be the first command issued. You can intermix User Language procedures and other batch functions with REGENERATE commands.
Using the IGNORE option
For example, providing the first journal the first REGEN command might be
REGEN FILE ABC FROM DUMPABC
A second run may provide the second journal and specify:
REGEN FILE ABC IGNORE
The second run begins where the previous REGEN processing ended and applies the second journal updates.
Note: If you omit a journal, Model 204 does not report this to you. Therefore, use the IGNORE option with care.
Using the TO UPDATE option
You can specify the TO UPDATE option for a single or multiple file run.
If TO UPDATE nn OF id is specified, it must appear only on the first FILE statement, and no other ‘TO’ options are allowed on subsequent files.
(In Model 204 version 7.6, the new message: M204:1664 "TO UPDATE" only allowed on first line of REGENerate
appears any time more than one TO UPDATE is specified, or if TO UPDATE is specified on a line other than the first.)
All additional files are recovered as though they each specified the same 'TO UPDATE' option. The id' timestamp is the END OF TRANSACTION timestamp. Once the 'end of transaction' is reached, further processing stops, all inflight transactions are backed out, and RC=0 is set.
If the update is not found in the journal, then the run stops immediately after pass 1. RC=4 is set. This message is displayed for each file:
M204.1409: MISSING STOPPING POINT FOR FILE filename
And this message is also displayed:
M204.1435: Error during regenerate
Using REGENERATE with multiple files
The number of files you can regenerate in a single run depends upon the settings of these parameters: NDIR (number of directory entries) and NFILES (number of file areas).