REGENERATE command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Automatically generated page update)
 
 
(16 intermediate revisions by 2 users not shown)
Line 7: Line 7:
</dl>
</dl>
==Syntax==
==Syntax==
<p class="syntax"><b>REGEN</b>ERATE FILE filename [FROM <i>dumpname</i> | IGNORE]  
<p class="syntax"><b>REGEN</b>ERATE FILE <span class="term">filename</span> [FROM <span class="term">dumpname</span> | IGNORE]  
  [TO {<u>LAST UPDATE</u> [BEFORE <i>yy.ddd hh:mm:ss.th</i>]  
  [TO {<u>LAST UPDATE</u> [BEFORE <span class="term">yy.ddd hh:mm:ss.th</span>]  
  | LAST CHECKPOINT [BEFORE <i>yy.dd hh:mm:ss.th</i>]  
  | LAST CHECKPOINT [BEFORE <span class="term">yy.dd hh:mm:ss.th</span>]  
  | UPDATE <i>nn</i> OF <i>yy.ddd hh:mm:ss.th</i>  
  | UPDATE <span class="term">number</span> OF <span class="term">yy.ddd hh:mm:ss.th</span>  
  | CHECKPOINT <i>yy.ddd hh:mm:ss.th}</i>]
  | CHECKPOINT <span class="term">yy.ddd hh:mm:ss.th</span>}]
</p>
</p>
<p>For more than one file, specify REGENERATE only once; the remaining syntax is repeated for each file.</p>
<p>For more than one file, specify REGENERATE only once; the remaining syntax is repeated for each file.</p>
Line 18: Line 18:
<ul>  
<ul>  
<li>
<li>
<p>filename is the name of a <var class="product">Model&nbsp;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&nbsp;204</var> file that is one to eight characters long.</p>
</li>
</li>
   
   
Line 35: Line 35:
   
   
<li>
<li>
<p>dumpname is the ddname of the dumped file, one to eight characters long, from which to recover.</p>
<p><var class="term">dumpname</var> is the ddname of the dumped file, one to eight characters long, from which to recover.</p>
</li>
</li>
   
   
Line 43: Line 43:
   
   
<li>
<li>
<p>The TO clause options listed in the table below identify the stopping point:TO clause options (Continued)</p>
<p>The TO clause options listed in the table below identify the stopping point:</p>
<table>
<table>
    
    
<tr> <th>
<tr class="head"> <th>
<p>Option</p>
<p>Option</p>
</th> <th>
</th> <th>
Line 52: Line 52:
</th> </tr>
</th> </tr>
    
    
<tr> <th><var>
<tr> <th><var>LAST UPDATE</var></th> <td>All. This is the default.  </td> </tr>
<p>LAST UPDATE</p>
</var></th> <td>All. This is the default.  </td> </tr>
   
   
<tr> <th><var>
<tr> <th><var>LAST CHECKPOINT</var></th>  
<p>LAST CHECKPOINT</p>
<td>Last checkpoint on the input journal.
</var></th> <td>
<p>Last checkpoint on the input journal.</p>
</td> </tr>
</td> </tr>
   
   
<tr> <th><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>
<p>UPDATE number  [OF <i>id</i>]</p>
</var></th> <td>And including the specified update. The ID, which is the date/time stamp from the END OF UPDATE message, is specified in the form: yy.ddd hh:mm:ss.th.   </td> </tr>
   
   
<tr> <th><var>
<tr> <th><var>CHECKPOINT <i>id</i></var></th>  
<p>CHECKPOINT <i>id</i></p>
<td>Specified checkpoint. The ID is specified in the form: yy.ddd hh:mm:ss.th. </td> </tr>  
</var></th> <td>
<p>Specified checkpoint. The ID is specified in the form: yy.ddd hh:mm:ss.th. </p>
</td> </tr>
 
</table>
</table>
</li>
</li>
Line 82: Line 72:
===Syntax notes===
===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.
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==
==Examples==
<p class="code">REGENERATE FILE DB1 FROM DUMPDB1
<p class="code">REGENERATE FILE DB1 FROM DUMPDB1
Line 99: Line 90:
</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&nbsp;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&nbsp;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 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. </p>
<p>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. </p>
<p>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.</p>
<p>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.</p>
<p>When it processes REGENERATE, <var class="product">Model&nbsp;204</var> ends any update unit in progress and begins a no-back out-allowed update unit. For more information about <var class="product">Model&nbsp;204</var> update units, see the <var>Model&nbsp;204 File Manager's Guide</var>.</p>
<p>When it processes REGENERATE, <var class="product">Model&nbsp;204</var> ends any update unit in progress and begins a no-back out-allowed update unit. For more information about <var class="product">Model&nbsp;204</var> update units, see [[File_integrity_and_recovery#Update_units_and_transactions|Update units and transactions]].</p>
<p>For a single-user (batch) <var class="product">Model&nbsp;204</var> 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.</p>
<p>For a single-user (batch) <var class="product">Model&nbsp;204</var> 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.</p>
====Using the IGNORE option====
====Using the IGNORE option====
Line 119: Line 111:
<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&nbsp;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&nbsp;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 the NDIR and NFILES parameters: [[NDIR parameter|"NDIR: Number of file directory entries"]] and [[NFILES parameter|"NFILES: Number of file save areas"]], respectively.</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 23:19, 7 March 2014

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 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:

  • 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).