File dumping and restoring: Difference between revisions
m (misc formatting) |
|||
(12 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<div class="toclimit-3"> | |||
==Overview== | ==Overview== | ||
<p>The <var>[[DUMP command|DUMP]]</var> and <var> [[RESTORE command|RESTORE]]</var> commands copy file pages from one data set to another. This page describes the DUMP and RESTORE commands and provides examples of a number of their applications. </p> | <p> | ||
<p>The DUMP and RESTORE commands are by no means the only way to make backups and copies of Model 204 files. The normal data set backup/restore/copy techniques in use at your site are almost certainly usable against Model 204 files. However, these techniques require exclusive access to the files. Either the files cannot be in any other job while the backup/restore/copy is run, or the job using the files must be quiesced (using the EXTENDED QUIESCE option on the <var>[[CHECKPOINT command|CHECKPOINT]]</var> command).</p> | The <var>[[DUMP command|DUMP]]</var> and <var> [[RESTORE command|RESTORE]]</var> commands copy file pages from one data set to another. This page describes the DUMP and RESTORE commands and provides examples of a number of their applications. </p> | ||
<p> | |||
The DUMP and RESTORE commands are by no means the only way to make backups and copies of Model 204 files. The normal data set backup/restore/copy techniques in use at your site are almost certainly usable against Model 204 files. However, these techniques require exclusive access to the files. Either the files cannot be in any other job while the backup/restore/copy is run, or the job using the files must be quiesced (using the EXTENDED QUIESCE option on the <var>[[CHECKPOINT command|CHECKPOINT]]</var> command).</p> | |||
===DUMP and RESTORE commands=== | ===DUMP and RESTORE commands=== | ||
<ul> | <ul> | ||
<li>The <var class="product">Model 204</var> <var> | <li>The <var class="product">Model 204</var> <var>DUMP</var> command "takes a snapshot" of a <var class="product">Model 204</var> file at a particular time to create a backup copy of the data. </li> | ||
<li>Using this copy, the <var> | |||
<li>Using this copy, the <var>RESTORE</var> command returns the file to its exact state at the time the <var>DUMP</var> was taken. </li> | |||
</ul> | </ul> | ||
<p>The <var class="product">Model 204</var> DUMP/RESTORE facility allows you to perform the following functions on one or more files:</p> | <p> | ||
The <var class="product">Model 204</var> DUMP/RESTORE facility allows you to perform the following functions on one or more files:</p> | |||
<ul> | <ul> | ||
<li>These functions can be done with any backup technique: | <li>These functions can be done with any backup technique: | ||
<ul> | <ul> | ||
<li>Recover from disk crashes, operating system crashes, accidentally scratched data sets, and sabotage</li> | <li>Recover from disk crashes, operating system crashes, accidentally scratched data sets, and sabotage</li> | ||
<li>Move a <var class="product">Model 204</var> file from one device to another</li> | <li>Move a <var class="product">Model 204</var> file from one device to another</li> | ||
</ul> | </ul></li> | ||
<li>These functions can only be done with the dump/restore: | |||
<li>These functions can only be done with the dump/restore: | |||
<ul> | <ul> | ||
<li>Change the number and size of a file's data sets </li> | <li>Change the number and size of a file's data sets </li> | ||
<li>Rename the file</li> | <li>Rename the file</li> | ||
<li>Rearrange file pages after using an INCREASE command</li> | <li>Rearrange file pages after using an <var>[[INCREASE command|INCREASE]]</var> command</li> | ||
<li>Move all file pages into one (larger) data set after an INCREASE DATASETS command.</li> | <li>Move all file pages into one (larger) data set after an <var>[[#Syntax for INCREASE DATASETS|INCREASE DATASETS]]</var> command.</li> | ||
</ul></li> | |||
</ul> | </ul> | ||
< | <p> | ||
However, because the DUMP and RESTORE commands do not reorganize the content in any way, they cannot be used to change the file parameters or field attributes or to compact the file. </p> | |||
===DUMP and RESTORE product options=== | ===DUMP and RESTORE product options=== | ||
<p>The | <p> | ||
The <var class="product">Fast/Backup</var> product provides a plug-compatible replacement for the the DUMP and RESTORE commands. When installed, this product dramatically increases the performance of these commands. </p> | |||
See [[DUMP and DUMPX command|DUMP and DUMPX]] and [RESTORE and RESTOREX command]] as well as the [http:// | |||
See [[DUMP and DUMPX command|DUMP and DUMPX]] and [[RESTORE and RESTOREX command|RESTORE and RESTOREX]] as well as the <var class="book">[http://m204wiki.rocketsoftware.com/images/1/12/FastbackNew.pdf Fast/Backup User's Guide]</var> for more information. | |||
===Combining DUMP and RESTORE functions=== | ===Combining DUMP and RESTORE functions=== | ||
<p>You can combine many of these functions in a single DUMP and RESTORE run; that is, you can move a file to a new device, resize it, and rename it in a single series of DUMP and RESTORE steps.</p> | <p> | ||
You can combine many of these functions in a single DUMP and RESTORE run; that is, you can move a file to a new device, resize it, and rename it in a single series of DUMP and RESTORE steps.</p> | |||
==Using DUMP and RESTORE with media recovery== | |||
<p> | |||
If your site uses [[Media recovery|media recovery]] to recover files in the event of a media failure, such as a disk head crash, be sure to dump all <var class="product">Model 204</var> files on a regular basis. In addition, ensure that journals are produced for runs that update files between dumps. </p> | |||
<p> | |||
When a dump is taken, <var class="product">Model 204</var> records the time and date on both the dump data set and the journal data set (if journaling is active). When media recovery is performed, the starting point in the journal for reapplying updates to a file is the first update that occurs after the time and date of the dump data set. (See [[Tracking system activity (CCAJRNL, CCAAUDIT, CCAJLOG)]] for information about journaling, and also see the description of the <var>[[REGENERATE command|REGENERATE]]</var> command.)</p> | |||
==Dumping files== | ==Dumping files== | ||
<p>The DUMP command makes a copy of an open <var class="product">Model 204</var> file on a sequential data set. This data set can be on either a magnetic tape or a direct access device. </p> | <p> | ||
<p>When you enter the DUMP command:</p> | The DUMP command makes a copy of an open <var class="product">Model 204</var> file on a sequential data set. This data set can be on either a magnetic tape or a direct access device. </p> | ||
<p> | |||
When you enter the DUMP command:</p> | |||
<ol> | <ol> | ||
<li>DUMP waits until all existing transactions that might update the file have completed and the existing copy of the file is in a consistent state.</li> | <li>DUMP waits until all existing transactions that might update the file have completed and the existing copy of the file is in a consistent state.</li> | ||
<li><var class="product">Model 204</var> dumps the file.</li> | <li><var class="product">Model 204</var> dumps the file.</li> | ||
<li> If, while the dump is being taken, a subsequent user request updates the file being dumped, <var class="product">Model 204</var> dumps preimages of database pages to be updated before the update is allowed. This guarantees that the dumped copy matches the state of the file at the time DUMP began.</li> | <li> If, while the dump is being taken, a subsequent user request updates the file being dumped, <var class="product">Model 204</var> dumps preimages of database pages to be updated before the update is allowed. This guarantees that the dumped copy matches the state of the file at the time DUMP began.</li> | ||
</ol> | </ol> | ||
====Syntax==== | ====Syntax==== | ||
<p class=" | <p> | ||
The format of the DUMP command is:</p> | |||
<p class="syntax">DUMP TO <span class="term">dumpfile</span> | |||
</p> | </p> | ||
<p> | <p> | ||
<p>dumpfile is the dump | Where:</p> | ||
<p>When the DUMP command is issued, it must wait for all updating transactions to complete before it can begin. If a file is being updated, the following message is displayed:</p> | <p> | ||
<p class="code">DUMP TO < | <var class="term">dumpfile</var> is the dump file name.</p> | ||
<p> | |||
When the DUMP command is issued, it must wait for all updating transactions to complete before it can begin. If a file is being updated, the following message is displayed:</p> | |||
<p class="code">DUMP TO <i>dumpfile</i> | |||
<b></b>*** M204.0602: FILE IS IN USE | <b></b>*** M204.0602: FILE IS IN USE | ||
<b></b>*** M204.1076: DO YOU REALLY WANT TO TRY AGAIN? | <b></b>*** M204.1076: DO YOU REALLY WANT TO TRY AGAIN? | ||
</p> | </p> | ||
<p>If you reply with Y (yes), <var class="product">Model 204</var> tries again to enqueue the file. If you reply with N (no), <var class="product">Model 204</var> does not try again to enqueue the file, but returns control to you so that you can issue another command. The default response is N.</p> | <p> | ||
<p>When the dump begins, <var class="product">Model 204</var> displays the following message:</p> | If you reply with Y (yes), <var class="product">Model 204</var> tries again to enqueue the file. If you reply with <code>N</code> (no), <var class="product">Model 204</var> does not try again to enqueue the file, but returns control to you so that you can issue another command. The default response is N.</p> | ||
<p class="code"><b></b>*** M204.1760: FILE < | <p> | ||
When the dump begins, <var class="product">Model 204</var> displays the following message:</p> | |||
<p class="code"><b></b>*** M204.1760: FILE <i>filename</i>: DUMP BEGINNING at <i>hh:mm:ss</i> | |||
</p> | </p> | ||
<p>This information also appears on the audit trail.</p> | <p> | ||
<p>If DUMP cannot begin for an extended period of time, you can cancel the command in response to the "DO YOU REALLY WANT TO?" message.</p> | This information also appears on the audit trail.</p> | ||
<p>If the dump completes without errors, the following message is displayed:</p> | <p> | ||
<p class="code"><b></b>*** M204.1761: FILE < | If DUMP cannot begin for an extended period of time, you can cancel the command in response to the "DO YOU REALLY WANT TO?" message.</p> | ||
<p> | |||
If the dump completes without errors, the following message is displayed:</p> | |||
<p class="code"><b></b>*** M204.1761: FILE <i>filename</i>: DUMP COMPLETED AT <i>hh</i>:<i>mm</i>:<i>ss</i> | |||
</p> | </p> | ||
===Setting up the DUMP/RESTORE utility=== | ===Setting up the DUMP/RESTORE utility=== | ||
<p>Because dumps are often done in batch runs, the BATCH204 module contains the DUMP/RESTORE utility. In addition to the normal JCL or EXEC that the system manager supplies to run BATCH204, the DUMP command requires a DD statement or FILEDEF for the dump file. </p> | <p> | ||
Because dumps are often done in batch runs, the BATCH204 module contains the DUMP/RESTORE utility. In addition to the normal JCL or EXEC that the system manager supplies to run BATCH204, the DUMP command requires a DD statement or FILEDEF for the dump file. </p> | |||
====Naming DUMP files==== | ====Naming DUMP files==== | ||
<p>Although you can choose any file name, a name that begins with DUMP is usually used. | <p> | ||
Although you can choose any file name, a name that begins with <code>DUMP</code> is usually used. </p> | |||
====DUMP command usage notes==== | ====DUMP command usage notes==== | ||
<p>The DUMP command works only in file context, and file manager privileges are required for its use.</p> | <p> | ||
<p>The file to be dumped must be opened before issuing DUMP, and then must be closed after DUMP completes.</p> | The DUMP command works only in file context, and file manager privileges are required for its use.</p> | ||
<p> | |||
The file to be dumped must be opened before issuing DUMP, and then must be closed after DUMP completes.</p> | |||
====Errors during file dumps==== | ====Errors during file dumps==== | ||
<p>If errors are detected during the file dump, the dump ends and the following message is displayed:</p> | <p> | ||
<p class="code"><b></b>*** M204.1762: FILE < | If errors are detected during the file dump, the dump ends and the following message is displayed:</p> | ||
<p class="code"><b></b>*** M204.1762: FILE <i>filename</i>: DUMP ENDED ABNORMALLY | |||
</p> | </p> | ||
<p>Other users of the file are unaffected by DUMP errors and not forced to wait.</p> | <p> | ||
Other users of the file are unaffected by DUMP errors and not forced to wait.</p> | |||
===Dumping multiple files=== | ===Dumping multiple files=== | ||
<p>More than one <var class="product">Model 204</var> file can be dumped in one run. Include a DD statement or FILEDEF for each file and for each dump file. Each file can be opened and dumped in turn. Including a CLOSE command after each DUMP prevents overrunning the NFILES parameter. In addition, the CLOSE ensures that one file is not accidentally dumped twice if the subsequent OPEN fails. For example: </p> | <p> | ||
More than one <var class="product">Model 204</var> file can be dumped in one run. Include a DD statement or FILEDEF for each file and for each dump file. Each file can be opened and dumped in turn. Including a CLOSE command after each DUMP prevents overrunning the NFILES parameter. In addition, the CLOSE ensures that one file is not accidentally dumped twice if the subsequent OPEN fails. For example: </p> | |||
<p class="code">OPEN PEOPLE | <p class="code">OPEN PEOPLE | ||
DUMP TO DUMPPEOP | DUMP TO DUMPPEOP | ||
Line 87: | Line 124: | ||
CLOSE CARS | CLOSE CARS | ||
</p> | </p> | ||
<p>If an error is detected during a DUMP command, the <var class="product">Model 204</var> job step return code is set to 20.</p> | <p> | ||
If an error is detected during a DUMP command, the <var class="product">Model 204</var> job step return code is set to 20.</p> | |||
===z/OS considerations=== | ===z/OS considerations=== | ||
<p>Under the z/OS operating system, the dump file DD statement must contain the following parameters:</p> | <p> | ||
Under the z/OS operating system, the dump file DD statement must contain the following parameters:</p> | |||
<ul> | <ul> | ||
<li>DSNAME</li> | <li>DSNAME</li> | ||
Line 96: | Line 136: | ||
<li>VOLUME</li> | <li>VOLUME</li> | ||
</ul> | </ul> | ||
<p>If the data set is on tape, you can use the LABEL parameter.</p> | <p> | ||
<p>If the data set is on disk, the SPACE parameter must be present and set equivalent to the amount of space occupied by the <var class="product">Model 204</var> file.</p> | If the data set is on tape, you can use the LABEL parameter.</p> | ||
<p>Omit DCB information unless your site uses blocking as discussed in [[#Blocking DUMP data sets|Blocking DUMP data sets]]. | <p> | ||
If the data set is on disk, the SPACE parameter must be present and set equivalent to the amount of space occupied by the <var class="product">Model 204</var> file.</p> | |||
<p> | |||
Omit DCB information unless your site uses blocking as discussed in [[#Blocking DUMP data sets|Blocking DUMP data sets]]. </p> | |||
====Blocking DUMP data sets==== | ====Blocking DUMP data sets==== | ||
<p>DUMP data sets can be blocked. In z/OS, specify a BLKSIZE entry in the DCB parameter in the DD statement. The specified block size must be a multiple of 6184 (that is, PAGESZ). If it is not, <var class="product">Model 204</var> rounds the block size down to the next multiple of 6184. | <p> | ||
DUMP data sets can be blocked. In z/OS, specify a BLKSIZE entry in the DCB parameter in the DD statement. The specified block size must be a multiple of 6184 (that is, <var>[[PAGESZ parameter|PAGESZ]]</var>). If it is not, <var class="product">Model 204</var> rounds the block size down to the next multiple of 6184. </p> | |||
<p> | |||
As of version 7.5, if the BLKSIZE is zero or is not specified, the z/OS operating system calculates the optimal BLKSIZE. | |||
In version 7.4 and earlier, if the BLKSIZE is zero or is not specified, 6184 is used as the default block size. | |||
</p> | |||
====z/OS example==== | ====z/OS example==== | ||
<p>For example, the following z/OS job step dumps the PEOPLE file to a tape:</p> | <p> | ||
<p class="code">//EXEC Include here the basic JCL or cataloged | For example, the following z/OS job step dumps the PEOPLE file to a tape:</p> | ||
<p class="code">//EXEC <i>Include here the basic JCL or cataloged | |||
procedure invocation provided by the | procedure invocation provided by the | ||
Model 204 system manager to run BATCH204 | Model 204 system manager to run BATCH204</i> | ||
//PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=SHR | //PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=SHR | ||
//DUMPPEOP DD DSN=M204.DUMP.PEOPLE, | //DUMPPEOP DD DSN=M204.DUMP.PEOPLE, | ||
Line 118: | Line 170: | ||
/* | /* | ||
</p> | </p> | ||
====z/VM example==== | ====z/VM example==== | ||
<p>The following z/VM EXEC, DUMPPEOP, assumes that the tape used has already been labeled. To run the EXEC in ONLINE, enter:</p> | <p> | ||
The following z/VM EXEC, DUMPPEOP, assumes that the tape used has already been labeled. To run the EXEC in ONLINE, enter:</p> | |||
<p class="code"><var>ONLINE BYPASS DUMPPEOP </var> | <p class="code"><var>ONLINE BYPASS DUMPPEOP </var> | ||
</p> | </p> | ||
<p>The DUMPPEOP EXEC follows:</p> | <p> | ||
The DUMPPEOP EXEC follows:</p> | |||
<p class="code">&CONTROL OFF | <p class="code">&CONTROL OFF | ||
FILEDEF * CLEAR | FILEDEF * CLEAR | ||
Line 133: | Line 188: | ||
FILEDEF PEOPLE M DSN M204 FILE PEOPLE | FILEDEF PEOPLE M DSN M204 FILE PEOPLE | ||
FILEDEF CCAIN DISK DUMPPEOP CCAIN * | FILEDEF CCAIN DISK DUMPPEOP CCAIN * | ||
&STACK SYSOPT 128 LIBUFF 600 | &STACK SYSOPT 128 LIBUFF 600 | ||
</p> | </p> | ||
====Sample z/VM CCAIN stream==== | ====Sample z/VM CCAIN stream==== | ||
<p>The DUMPPEOP CCAIN input contains:</p> | <p> | ||
The DUMPPEOP CCAIN input contains:</p> | |||
<p class="code">PAGESZ=6184 | <p class="code">PAGESZ=6184 | ||
OPEN PEOPLE | OPEN PEOPLE | ||
Line 143: | Line 200: | ||
EOJ | EOJ | ||
</p> | </p> | ||
===z/VSE considerations=== | ===z/VSE considerations=== | ||
<p>Any dump data sets that are to be referenced by the DUMP or RESTORE commands must be described in the batch or Online JCL stream with DLBL and EXTENT statements if they are to be disk resident, or with a TLBL statement if the dump data set is to be on magnetic tape. </p> | <p> | ||
<p>The file name used for a disk dump data set must be the same as the dump file name referenced in the DUMP command. That is, if the command DUMP TO DUMPTST is issued to the batch or Online program, a DLBL for file name DUMPTST must be included in the JCL.</p> | Any dump data sets that are to be referenced by the DUMP or RESTORE commands must be described in the batch or Online JCL stream with DLBL and EXTENT statements if they are to be disk resident, or with a TLBL statement if the dump data set is to be on magnetic tape. </p> | ||
<p>If you want to place the dump data set on tape, issue a DEFINE DATASET command before the DUMP command to establish the relationship between the dump file referenced in the DUMP command and the file name used on the TLBL statement.</p> | <p> | ||
The file name used for a disk dump data set must be the same as the dump file name referenced in the DUMP command. That is, if the command <code>DUMP TO DUMPTST</code> is issued to the batch or Online program, a DLBL for file name <code>DUMPTST</code> must be included in the JCL.</p> | |||
<p> | |||
If you want to place the dump data set on tape, issue a DEFINE DATASET command before the DUMP command to establish the relationship between the dump file referenced in the DUMP command and the file name used on the TLBL statement.</p> | |||
====Dump data set characteristics==== | ====Dump data set characteristics==== | ||
<p>The default characteristics of the dump data set are:</p> | <p> | ||
The default characteristics of the dump data set are:</p> | |||
<table> | <table> | ||
<tr class="head"> | <tr class="head"> | ||
Line 154: | Line 217: | ||
<th>Value</th> | <th>Value</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Logical record length</td> | <td>Logical record length</td> | ||
<td>6184 (value of <var class="product">Model 204</var> PAGESZ parameter)</td> | <td>6184 (value of <var class="product">Model 204</var> PAGESZ parameter)</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Physical block size</td> | <td>Physical block size</td> | ||
<td | <td>6184</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Record format</td> | <td>Record format</td> | ||
Line 167: | Line 233: | ||
</tr> | </tr> | ||
</table> | </table> | ||
<p>The only parameter that can be overridden with the DEFINE DATASET command is the physical block size. To alter the block size, issue the DEFINE DATASET command before the DUMP or RESTORE command.</p> | <p> | ||
The only parameter that can be overridden with the DEFINE DATASET command is the physical block size. To alter the block size, issue the DEFINE DATASET command before the DUMP or RESTORE command.</p> | |||
====Positioning the tape==== | ====Positioning the tape==== | ||
<p>These commands do not perform any tape positioning. Position the tape through the MTC (Magnetic Tape Command) JCL statement in the startup JCL for the batch or Online program. </p> | <p> | ||
These commands do not perform any tape positioning. Position the tape through the MTC (Magnetic Tape Command) JCL statement in the startup JCL for the batch or Online program. </p> | |||
====z/VSE example==== | ====z/VSE example==== | ||
<p>The following example of the DUMP command is used to dump to tape:</p> | <p> | ||
The following example of the DUMP command is used to dump to tape:</p> | |||
<p class="code">// JOB ONLINE WITH TAPE DUMP | <p class="code">// JOB ONLINE WITH TAPE DUMP | ||
. | . | ||
Line 181: | Line 252: | ||
// EXTENT SYS005 | // EXTENT SYS005 | ||
// EXEC ONLINE,SIZE=AUTO | // EXEC ONLINE,SIZE=AUTO | ||
user zero parameters | <i>user zero parameters</i> | ||
LOGIN userid | LOGIN <i>userid</i> | ||
password | <i>password</i> | ||
OPEN PEOPLE | OPEN PEOPLE | ||
DEFINE DATASET DUMPPEOP WITH SCOPE=SYSTEM DDNAME=SYS006 | DEFINE DATASET DUMPPEOP WITH SCOPE=SYSTEM DDNAME=SYS006 | ||
Line 190: | Line 261: | ||
EOJ | EOJ | ||
/* | /* | ||
/& | /& | ||
</p> | </p> | ||
==Restoring files== | ==Restoring files== | ||
<p>The RESTORE command takes the sequential data set produced by a DUMP command and turns it back into a <var class="product">Model 204</var> file. The BATCH204 module normally is used in a batch run, and the JCL or EXEC must include data set or file definition statements for the data sets of the <var class="product">Model 204</var> file and the dump data set. </p> | <p> | ||
The RESTORE command takes the sequential data set produced by a DUMP command and turns it back into a <var class="product">Model 204</var> file. The BATCH204 module normally is used in a batch run, and the JCL or EXEC must include data set or file definition statements for the data sets of the <var class="product">Model 204</var> file and the dump data set. </p> | |||
====Syntax==== | ====Syntax==== | ||
<p class=" | <p> | ||
The format of the RESTORE command is:</p> | |||
<p class="syntax">RESTORE [<span class="term">options</span>] FROM <span class="term">name</span> | |||
</p> | </p> | ||
<p> | <p> | ||
< | Where: </p> | ||
<ul> | |||
<li><var class="term">options</var> are expressed as a decimal number. The RESTORE options are as follows: | |||
<table> | <table> | ||
<tr class="head"> | <tr class="head"> | ||
Line 205: | Line 282: | ||
<th>Meaning</th> | <th>Meaning</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td align="right">128 </td> | <td align="right">128 </td> | ||
<td>Size of a file data set or the number of data sets in a file is being changed.</td> | <td>Size of a file data set or the number of data sets in a file is being changed.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td align="right">192</td> | <td align="right">192</td> | ||
<td>Name of a file is being changed.</td> | <td>Name of a file is being changed.</td> | ||
</tr> | </tr> | ||
</table> | </table></li> | ||
< | |||
<li><var class="term">name</var> is the dump data set or dump file name from which the <var class="product">Model 204</var> file is being restored. </li> | |||
</ul> | |||
====Usage==== | ====Usage==== | ||
<p>A private or semipublic file is automatically closed after being restored. Public files remain open. </p> | <p> | ||
<p>The RESTORE command can be issued from within a procedure.</p> | A private or semipublic file is automatically closed after being restored. Public files remain open. </p> | ||
<p> | |||
The RESTORE command can be issued from within a procedure.</p> | |||
====Informational and error messages==== | ====Informational and error messages==== | ||
<p>Messages inform you when the RESTORE begins and ends. If an error is detected during a RESTORE command, the <var class="product">Model 204</var> job step return code is set to 20.</p> | <p> | ||
Messages inform you when the RESTORE begins and ends. If an error is detected during a RESTORE command, the <var class="product">Model 204</var> job step return code is set to 20.</p> | |||
===Restoring to original data sets=== | ===Restoring to original data sets=== | ||
<p>In the event of a system crash or inadvertently administered file updates (for example, a user accidentally initializes a file), you might want to restore the file to its state at the time of the last dump. </p> | <p> | ||
<p>If the file's data sets are still in the same location and have not been damaged physically, you can open the file and use RESTORE FROM < | In the event of a system crash or inadvertently administered file updates (for example, a user accidentally initializes a file), you might want to restore the file to its state at the time of the last dump. </p> | ||
<p> | |||
If the file's data sets are still in the same location and have not been damaged physically, you can open the file and use <code>RESTORE FROM <i>name</i></code> without specifying any options.</p> | |||
====z/OS example==== | ====z/OS example==== | ||
<p class="code">//EXEC Include here the basic JCL or cataloged | <p class="code">//EXEC <i>Include here the basic JCL or cataloged | ||
procedure invocation provided by the | procedure invocation provided by the | ||
Model 204 system manager to run BATCH204. | Model 204 system manager to run BATCH204.</i> | ||
//PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=SHR | //PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=SHR | ||
//DUMPPEOP DD DSN=M204.DUMP.PEOPLE, | //DUMPPEOP DD DSN=M204.DUMP.PEOPLE, | ||
Line 237: | Line 327: | ||
/* | /* | ||
</p> | </p> | ||
====z/VSE example==== | ====z/VSE example==== | ||
<p class="code">//JOB BATCH204 RESTORE FROM TAPE DUMP | <p class="code">//JOB BATCH204 RESTORE FROM TAPE DUMP | ||
Line 247: | Line 338: | ||
// EXTENT SYS005 | // EXTENT SYS005 | ||
// EXEC BATCH204,SIZE=AUTO | // EXEC BATCH204,SIZE=AUTO | ||
user zero parameters | <i>user zero parameters</i> | ||
LOGIN userid | LOGIN <i>userid</i> | ||
password | <i>password</i> | ||
OPEN PEOPLE | OPEN PEOPLE | ||
DEFINE DATASET DUMPPEOP WITH SCOPE=SYSTEM DDNAME=SYS006 | DEFINE DATASET DUMPPEOP WITH SCOPE=SYSTEM DDNAME=SYS006 | ||
Line 258: | Line 349: | ||
/& | /& | ||
</p> | </p> | ||
====z/VM example==== | ====z/VM example==== | ||
<p>For z/VM, using the dump file (DUMPPEOP) created in the z/VM example on [[#z/VM example|z/VM example]], a RESTORE EXEC follows. Issue the command ONLINE BYPASS RESTORE to invoke the following EXEC:</p> | <p> | ||
For z/VM, using the dump file (DUMPPEOP) created in the z/VM example on [[#z/VM example|z/VM example]], a RESTORE EXEC follows. Issue the command ONLINE BYPASS RESTORE to invoke the following EXEC:</p> | |||
<p class="code">&CONTROL OFF | <p class="code">&CONTROL OFF | ||
FILEDEF * CLEAR | FILEDEF * CLEAR | ||
Line 272: | Line 365: | ||
&STACK SYSOPT 128 LIBUFF 600 | &STACK SYSOPT 128 LIBUFF 600 | ||
</p> | </p> | ||
<p>where the RESTPEOP CCAIN input contains:</p> | <p> | ||
where the RESTPEOP CCAIN input contains:</p> | |||
<p class="code">PAGESZ=6184 | <p class="code">PAGESZ=6184 | ||
OPEN PEOPLE | OPEN PEOPLE | ||
Line 279: | Line 373: | ||
EOJ | EOJ | ||
</p> | </p> | ||
===Restoring to new data sets=== | ===Restoring to new data sets=== | ||
<p>If one or more file data sets are physically damaged by a disk crash or are accidentally overwritten, you might need to reallocate the data sets and restore the file. Follow these steps:</p> | <p> | ||
If one or more file data sets are physically damaged by a disk crash or are accidentally overwritten, you might need to reallocate the data sets and restore the file. Follow these steps:</p> | |||
<ol> | <ol> | ||
<li>Reallocate the data sets with exactly the same number of pages that they had originally. (If the size of a data set must be changed, see [[#Changing the size or number of file data sets|Changing the size or number of file data sets]].)</li> | <li>Reallocate the data sets with exactly the same number of pages that they had originally. (If the size of a data set must be changed, see [[#Changing the size or number of file data sets|Changing the size or number of file data sets]].)</li> | ||
<li>Re-create the file. The CREATE command properly formats the tracks of the new data set. Without the CREATE, RESTORE can cause a TROUBLE WITH DISK I/O error message to appear. | <li>Re-create the file. The CREATE command properly formats the tracks of the new data set. Without the CREATE, RESTORE can cause a TROUBLE WITH DISK I/O error message to appear. | ||
<p>Let parameters default to their default values. RESTORE resets all parameters to their dumped values.</p> | <p> | ||
<p>To skew files, specify the X'40' bit of the FILEORG parameter with the CREATE command. </p> | Let parameters default to their default values. RESTORE resets all parameters to their dumped values.</p> | ||
<p> | |||
To skew files, specify the X'40' bit of the <var>[[FILEORG parameter|FILEORG]]</var> parameter with the CREATE command. </p> | |||
</li> | </li> | ||
<li>Open and restore the file with the 128 option. The syntax for the 128 option is:</li> | |||
<li>Open and restore the file with the 128 option. The syntax for the 128 option is: | |||
<p class="syntax">RESTORE 128 FROM <span class="term">ddname</span></p></li> | |||
</ol> | </ol> | ||
====z/OS example==== | ====z/OS example==== | ||
<p>In the following z/OS example, a two-data set file, CARS, has its data sets reallocated:</p> | <p> | ||
In the following z/OS example, a two-data set file, CARS, has its data sets reallocated:</p> | |||
<p class="code">//EXEC PGM=BATCH204 | <p class="code">//EXEC PGM=BATCH204 | ||
//CARS DD DSN=M204.FILE.CARS,DISP=SHR | //CARS DD DSN=M204.FILE.CARS,DISP=SHR | ||
Line 306: | Line 409: | ||
/* | /* | ||
</p> | </p> | ||
====z/VSE example==== | ====z/VSE example==== | ||
<p class="code">// JOB RESTORE FILE CARS | <p class="code">// JOB RESTORE FILE CARS | ||
Line 322: | Line 426: | ||
// EXEC BATCH204,SIZE=AUTO | // EXEC BATCH204,SIZE=AUTO | ||
PAGESIZE=6184 | PAGESIZE=6184 | ||
LOGIN userid | LOGIN <i>userid</i> | ||
password | <i>password</i> | ||
DEFINE DATASET DUMPCARS WITH SCOPE=SYSTEM FILENAME=SYS010 | DEFINE DATASET DUMPCARS WITH SCOPE=SYSTEM FILENAME=SYS010 | ||
CREATE FILE CARS FROM CARS,CARS2 | CREATE FILE CARS FROM CARS,CARS2 | ||
Line 333: | Line 437: | ||
/& | /& | ||
</p> | </p> | ||
====z/VM example==== | ====z/VM example==== | ||
<p>For z/VM, run the following NEWCARS EXEC by entering the following command:</p> | <p> | ||
<p class="code" | For z/VM, run the following <code>NEWCARS</code> EXEC by entering the following command:</p> | ||
<p class="code">ONLINE BYPASS NEWCARS | |||
</p> | </p> | ||
<p>The NEWCARS EXEC and its associated CCAIN input follow:</p> | <p> | ||
The <code>NEWCARS</code> EXEC and its associated CCAIN input follow:</p> | |||
<p class="code">&CONTROL OFF | <p class="code">&CONTROL OFF | ||
FILEDEF CLEAR * | FILEDEF CLEAR * | ||
Line 352: | Line 459: | ||
&STACK SYSOPT 128 LIBUFF 600 | &STACK SYSOPT 128 LIBUFF 600 | ||
</p> | </p> | ||
<p>The NEWCARS CCAIN file contains:</p> | <p> | ||
The <code>NEWCARS</code> CCAIN file contains:</p> | |||
<p class="code">PAGESIZE=6184 | <p class="code">PAGESIZE=6184 | ||
LOGIN userid | LOGIN <i>userid</i> | ||
password | <i>password</i> | ||
CREATE FILE CARS FROM CARS,CARS2 | CREATE FILE CARS FROM CARS,CARS2 | ||
END | END | ||
OPEN CARS | OPEN CARS | ||
RESTORE 128 FROM DUMPCARS | RESTORE 128 FROM DUMPCARS | ||
EOJ | EOJ | ||
</p> | </p> | ||
==Moving Model 204 files== | ==Moving Model 204 files== | ||
<p>In most cases, use the <var class="product">Model 204</var> DUMP/RESTORE utility to move <var class="product">Model 204</var> files. Remember that you can combine DUMP and RESTORE functions; for example, you can move files to new data sets and resize them in the same set of steps.</p> | <p> | ||
<p>The instructions for moving files with the <var class="product">Model 204</var> DUMP/RESTORE utility follow. </p> | In most cases, use the <var class="product">Model 204</var> DUMP/RESTORE utility to move <var class="product">Model 204</var> files. Remember that you can combine DUMP and RESTORE functions; for example, you can move files to new data sets and resize them in the same set of steps.</p> | ||
<p> | |||
The instructions for moving files with the <var class="product">Model 204</var> DUMP/RESTORE utility follow. </p> | |||
===When can you use IBM move and copy utilities?=== | ===When can you use IBM move and copy utilities?=== | ||
<p>You can use the IBM utilities (IEHMOVE and IEBGENER for z/OS users, or a copy utility such as DITTO for z/VSE users) except when a skewed file is being moved to a different device type.</p> | <p> | ||
<p>If you use a non-<var class="product">Model 204</var> utility to move a skewed file from one device type to another (for example, from a 3350 to a 3380) you will not be able to open the file. </p> | You can use the IBM utilities (IEHMOVE and IEBGENER for z/OS users, or a copy utility such as DITTO for z/VSE users) except when a skewed file is being moved to a different device type.</p> | ||
<p>Under the same limitations you can also use the IBM utility DFDSS, if you specify ALLEXCP and do not specify TOL(ENQF).</p> | <p> | ||
If you use a non-<var class="product">Model 204</var> utility to move a skewed file from one device type to another (for example, from a 3350 to a 3380) you will not be able to open the file. </p> | |||
<p> | |||
Under the same limitations you can also use the IBM utility DFDSS, if you specify ALLEXCP and do not specify TOL(ENQF).</p> | |||
===Using DUMP and RESTORE to move files=== | ===Using DUMP and RESTORE to move files=== | ||
<p>Follow these steps to use DUMP/RESTORE to move files:</p> | <p> | ||
Follow these steps to use DUMP/RESTORE to move files:</p> | |||
<ol> | <ol> | ||
<li>Allocate new data set(s) for the file. Ensure that the number of data sets does not change and that each new data set has the same number of pages as the corresponding old data set. (See [[#Changing the size or number of file data sets|Changing the size or number of file data sets]] for more information.)</li> | <li>Allocate new data set(s) for the file. Ensure that the number of data sets does not change and that each new data set has the same number of pages as the corresponding old data set. (See [[#Changing the size or number of file data sets|Changing the size or number of file data sets]] for more information.)</li> | ||
<li>Dump the file to a dump data set or dump file using data set or file definition statements pointing to the old data sets or files.</li> | <li>Dump the file to a dump data set or dump file using data set or file definition statements pointing to the old data sets or files.</li> | ||
<li>Execute a separate job step with the new data sets or files, recreating the file and restoring from the dump data set or dump file. Unless the FILEORG parameter X'40' bit is turned on along with the CREATE command prior to the RESTORE, restored files are not skewed. The DD, DLBL, or FILEDEF names for the file must be identical to the old ones. </li> | <li>Execute a separate job step with the new data sets or files, recreating the file and restoring from the dump data set or dump file. Unless the FILEORG parameter X'40' bit is turned on along with the CREATE command prior to the RESTORE, restored files are not skewed. The DD, DLBL, or FILEDEF names for the file must be identical to the old ones. </li> | ||
</ol> | </ol> | ||
====z/OS example==== | ====z/OS example==== | ||
<p>For z/OS, the following job moves a three-data set file:</p> | <p> | ||
For z/OS, the following job moves a three-data set file:</p> | |||
<p class="code">//EXEC PGM=BATCH204 | <p class="code">//EXEC PGM=BATCH204 | ||
//PARTS DD DSN=M204.FILE.PARTS,DISP=SHR | //PARTS DD DSN=M204.FILE.PARTS,DISP=SHR | ||
Line 385: | Line 506: | ||
// UNIT=TAPE, VOL=SER=T00001 | // UNIT=TAPE, VOL=SER=T00001 | ||
//CCAIN DD * | //CCAIN DD * | ||
user zero parameters | <i>user zero parameters</i> | ||
OPEN PARTS | OPEN PARTS | ||
DUMP TO DUMPPART | DUMP TO DUMPPART | ||
Line 391: | Line 512: | ||
EOJ | EOJ | ||
/* | /* | ||
//EXEC PGM=BATCH204 | //EXEC PGM=BATCH204 | ||
//PARTS DD DSN=M204.FILE.NEWPARTS,DISP=SHR | //PARTS DD DSN=M204.FILE.NEWPARTS,DISP=SHR | ||
Line 399: | Line 520: | ||
// UNIT=TAPE,VOL=SER=T00001 | // UNIT=TAPE,VOL=SER=T00001 | ||
//CCAIN DD * | //CCAIN DD * | ||
user zero parameters | <i>user zero parameters</i> | ||
CREATE FILE PARTS FROM PARTS,PARTS2,PARTS3 | CREATE FILE PARTS FROM PARTS,PARTS2,PARTS3 | ||
END | END | ||
Line 408: | Line 529: | ||
/* | /* | ||
</p> | </p> | ||
====z/VSE example==== | ====z/VSE example==== | ||
<p class="code">// JOB MOVE FILE PARTS | <p class="code">// JOB MOVE FILE PARTS | ||
Line 414: | Line 536: | ||
. | . | ||
// DLBL PARTS,'M204.FILE.PARTS',,DA | // DLBL PARTS,'M204.FILE.PARTS',,DA | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// TLBL SYS010,'M204.DUMP.PARTS' | // TLBL SYS010,'M204.DUMP.PARTS' | ||
// ASSGN SYS010,X'300' | // ASSGN SYS010,X'300' | ||
// DLBL CCASTAT,'M204.CCASTAT' | // DLBL CCASTAT,'M204.CCASTAT' | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// UPSI 10010000 | // UPSI 10010000 | ||
// EXEC BATCH204,SIZE=AUTO | // EXEC BATCH204,SIZE=AUTO | ||
user zero parameters | <i>user zero parameters</i> | ||
LOGIN userid | LOGIN <i>userid</i> | ||
password | <i>password</i> | ||
DEFINE DATASET DUMPPART WITH SCOPE=SYSTEM FILENAME=SYS010 | DEFINE DATASET DUMPPART WITH SCOPE=SYSTEM FILENAME=SYS010 | ||
OPEN PARTS | OPEN PARTS | ||
Line 434: | Line 556: | ||
. | . | ||
// DLBL PARTS,'M204.FILE.NEWPARTS',,DA | // DLBL PARTS,'M204.FILE.NEWPARTS',,DA | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// TLBL SYS010,'M204.DUMP.PARTS' | // TLBL SYS010,'M204.DUMP.PARTS' | ||
// ASSGN SYS010,X'300' | // ASSGN SYS010,X'300' | ||
// DLBL CCASTAT,'M204.CCASTAT' | // DLBL CCASTAT,'M204.CCASTAT' | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// UPSI 10010000 | // UPSI 10010000 | ||
// EXEC BATCH204,SIZE=AUTO | // EXEC BATCH204,SIZE=AUTO | ||
user zero parameters | <i>user zero parameters</i> | ||
LOGIN userid | LOGIN <i>userid</i> | ||
password | <i>password</i> | ||
DEFINE DATASET DUMPPART WITH SCOPE=SYSTEM FILENAME=SYS010 | DEFINE DATASET DUMPPART WITH SCOPE=SYSTEM FILENAME=SYS010 | ||
CREATE FILE PARTS | CREATE FILE PARTS | ||
Line 454: | Line 576: | ||
/& | /& | ||
</p> | </p> | ||
====z/VM example==== | ====z/VM example==== | ||
<p>In z/VM, with the previously allocated and created PARTS, PARTS2, and PARTS3 files and dump file M204.DUMP.PARTS, use the DUMPPART EXEC to dump PARTS into the dump file by using the following command:</p> | <p> | ||
<p class="code" | In z/VM, with the previously allocated and created PARTS, PARTS2, and PARTS3 files and dump file M204.DUMP.PARTS, use the DUMPPART EXEC to dump PARTS into the dump file by using the following command:</p> | ||
<p class="code">ONLINE BYPASS DUMPPART | |||
</p> | </p> | ||
<p>The DUMPPART EXEC follows:</p> | <p> | ||
The DUMPPART EXEC follows:</p> | |||
<p class="code"> &CONTROL OFF | <p class="code"> &CONTROL OFF | ||
FILEDEF * CLEAR | FILEDEF * CLEAR | ||
Line 473: | Line 598: | ||
&STACK SYSOPT 128 LIBUFF 600 | &STACK SYSOPT 128 LIBUFF 600 | ||
</p> | </p> | ||
<p>where the DUMPPART CCAIN input contains:</p> | <p> | ||
where the DUMPPART CCAIN input contains:</p> | |||
<p class="code">PAGESZ=6184 | <p class="code">PAGESZ=6184 | ||
OPEN PARTS | OPEN PARTS | ||
Line 480: | Line 606: | ||
EOJ | EOJ | ||
</p> | </p> | ||
<p>Then re-create and restore PARTS from the dump file using the RESTPART EXEC invoked by the following command:</p> | <p> | ||
<p class="code" | Then re-create and restore PARTS from the dump file using the RESTPART EXEC invoked by the following command:</p> | ||
<p class="code">ONLINE BYPASS RESTPART | |||
</p> | </p> | ||
<p>The RESTPART EXEC follows:</p> | <p> | ||
The RESTPART EXEC follows:</p> | |||
<p class="code">&TRACE OFF | <p class="code">&TRACE OFF | ||
FILEDEF * CLEAR | FILEDEF * CLEAR | ||
Line 498: | Line 626: | ||
&STACK SYSOPT 128 LIBUFF 600 | &STACK SYSOPT 128 LIBUFF 600 | ||
</p> | </p> | ||
<p>where the RESTPART CCAIN input contains:</p> | <p> | ||
where the RESTPART CCAIN input contains:</p> | |||
<p class="code">PAGESZ=6184 | <p class="code">PAGESZ=6184 | ||
CREATE FILE PARTS FROM PARTS,PARTS2,PARTS3 | CREATE FILE PARTS FROM PARTS,PARTS2,PARTS3 | ||
Line 505: | Line 634: | ||
RESTORE 128 FROM DUMPPART | RESTORE 128 FROM DUMPPART | ||
CLOSE PARTS | CLOSE PARTS | ||
EOJ | EOJ | ||
</p> | </p> | ||
==Changing the size or number of file data sets== | ==Changing the size or number of file data sets== | ||
<p>The RESTORE command allows you to change the size of a file data set or the number of data sets in the file. (You can also use the INCREASE command to add data sets to the file. </p> | <p> | ||
<p>To change the size or number of file data sets:</p> | The RESTORE command allows you to change the size of a file data set or the number of data sets in the file. (You can also use the INCREASE command to add data sets to the file. </p> | ||
<p> | |||
To change the size or number of file data sets:</p> | |||
<ol> | <ol> | ||
<li>Dump the file as it currently exists.</li> | <li>Dump the file as it currently exists.</li> | ||
<li>Allocate or reallocate the desired data sets. The total number of pages in the file can increase or decrease, but they must not be less than the sum of the current values of the parameters: | |||
<li>Allocate or reallocate the desired data sets. The total number of pages in the file can increase or decrease, but they must not be less than the sum of the current values of the parameters: | |||
< | <code>8 + ASIZE + BSIZE + CSIZE + DSIZE</code> | ||
<p>The values of these parameters cannot be changed with DUMP/RESTORE. BSIZE and DSIZE, however, can be changed with the INCREASE and DECREASE commands. All changes in the total number of pages allocated are reflected in the viewable parameter FREESIZE, which indicates the number of unassigned pages. </p> | <p> | ||
< | The values of these parameters cannot be changed with DUMP/RESTORE. BSIZE and DSIZE, however, can be changed with the INCREASE and DECREASE commands. All changes in the total number of pages allocated are reflected in the viewable parameter FREESIZE, which indicates the number of unassigned pages. </p></li> | ||
<li>Run a job step that includes data set or file definition statements for the new data sets. This job re-creates the file from the new data sets, opens the file, and restores it from the dump data set, specifying the option 128 (that is, RESTORE 128 FROM <var class="term">name</var>). </li> | <li>Run a job step that includes data set or file definition statements for the new data sets. This job re-creates the file from the new data sets, opens the file, and restores it from the dump data set, specifying the option 128 (that is, RESTORE 128 FROM <var class="term">name</var>). </li> | ||
</ol> | </ol> | ||
====z/OS example==== | ====z/OS example==== | ||
<p>For example, the CENSUS file consists of five data sets, but you can consolidate them to one, reducing the number of data set or file definition statements required when using the file:</p> | <p> | ||
For example, the CENSUS file consists of five data sets, but you can consolidate them to one, reducing the number of data set or file definition statements required when using the file:</p> | |||
<p class="code">//JOB CONSOLIDATE CENSUS FILES | <p class="code">//JOB CONSOLIDATE CENSUS FILES | ||
//EXEC... | //EXEC... | ||
Line 531: | Line 666: | ||
// DISP=(NEW,PASS),UNIT=TAPE,VOL=SER=ABCDEF | // DISP=(NEW,PASS),UNIT=TAPE,VOL=SER=ABCDEF | ||
//CCAIN DD * | //CCAIN DD * | ||
user zero parameters | <i>user zero parameters</i> | ||
OPEN CENSUS | OPEN CENSUS | ||
DUMP TO DUMPCEN | DUMP TO DUMPCEN | ||
Line 541: | Line 676: | ||
// DISP=(NEW,CATLG),UNIT=2314, | // DISP=(NEW,CATLG),UNIT=2314, | ||
// VOL=SER=ABCDEF | // VOL=SER=ABCDEF | ||
// SPACE=(TRK,543,,CONTIG) | // SPACE=(TRK,543,,CONTIG) | ||
//DUMPCEN DD DSN=M204.DUMP.CENSUS,DISP=(OLD,KEEP), | //DUMPCEN DD DSN=M204.DUMP.CENSUS,DISP=(OLD,KEEP), | ||
// UNIT=TAPE,VOL=SER=ABCDEF | // UNIT=TAPE,VOL=SER=ABCDEF | ||
//CCAIN DD * | //CCAIN DD * | ||
user zero parameters | <i>user zero parameters</i> | ||
CREATE FILE CENSUS | CREATE FILE CENSUS | ||
END | END | ||
Line 555: | Line 690: | ||
/* | /* | ||
</p> | </p> | ||
====z/VSE example==== | ====z/VSE example==== | ||
<p class="code">// JOB CONSOLIDATE FILE CENSUS | <p class="code">// JOB CONSOLIDATE FILE CENSUS | ||
Line 561: | Line 697: | ||
. | . | ||
// DLBL CENSUS,'M204.FILE.CENFCT',,DA | // DLBL CENSUS,'M204.FILE.CENFCT',,DA | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// DLBL CENA,'M204.FILE.CENSUSA',,DA | // DLBL CENA,'M204.FILE.CENSUSA',,DA | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// DLBL CENB,'M204.FILE.CENSUSB',,DA | // DLBL CENB,'M204.FILE.CENSUSB',,DA | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// DLBL CENC,'M204.FILE.CENSUSC',,DA | // DLBL CENC,'M204.FILE.CENSUSC',,DA | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// DLBL CEND,'M204.FILE.CENSUSD',,DA | // DLBL CEND,'M204.FILE.CENSUSD',,DA | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// TLBL SYS010,'M204.DUMP.CENSUS' | // TLBL SYS010,'M204.DUMP.CENSUS' | ||
// ASSGN SYS010,X'300' | // ASSGN SYS010,X'300' | ||
// DLBL CCASTAT,'M204.CCASTAT' | // DLBL CCASTAT,'M204.CCASTAT' | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// UPSI 10010000 | // UPSI 10010000 | ||
// EXEC BATCH204,SIZE=AUTO | // EXEC BATCH204,SIZE=AUTO | ||
user zero parameters | <i>user zero parameters</i> | ||
LOGIN userid | LOGIN <i>userid</i> | ||
password | <i>password</i> | ||
DEFINE DATASET DUMPCEN WITH SCOPE=SYSTEM FILENAME=SYS010 | DEFINE DATASET DUMPCEN WITH SCOPE=SYSTEM FILENAME=SYS010 | ||
OPEN CENSUS | OPEN CENSUS | ||
Line 589: | Line 725: | ||
. | . | ||
// DLBL CENSUS,'M204.FILE.CENSUS',,DA | // DLBL CENSUS,'M204.FILE.CENSUS',,DA | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// TLBL SYS010,'M204.DUMP.CENSUS' | // TLBL SYS010,'M204.DUMP.CENSUS' | ||
// ASSGN SYS010,X'300' | // ASSGN SYS010,X'300' | ||
// DLBL CCASTAT,'M204.CCASTAT' | // DLBL CCASTAT,'M204.CCASTAT' | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// UPSI 10010000 | // UPSI 10010000 | ||
// EXEC BATCH204,SIZE=AUTO | // EXEC BATCH204,SIZE=AUTO | ||
user zero parameters | <i>user zero parameters</i> | ||
LOGIN userid | LOGIN <i>userid</i> | ||
password | <i>password</i> | ||
DEFINE DATASET DUMPCEN WITH SCOPE=SYSTEM - | DEFINE DATASET DUMPCEN WITH SCOPE=SYSTEM - | ||
FILENAME=SYS010 | FILENAME=SYS010 | ||
Line 610: | Line 746: | ||
/& | /& | ||
</p> | </p> | ||
====z/VM example==== | ====z/VM example==== | ||
<p>For z/VM, allocate the CENSUS file using the following command:</p> | <p> | ||
<p class="code" | For z/VM, allocate the CENSUS file using the following command:</p> | ||
<p class="code">M204UTIL ALLOCATE M204 FILE CENSUS M (PRIMARY 543 TRK | |||
</p> | </p> | ||
<p>Run the DUMPCENS EXEC to dump the CENSUS file by entering the following command:</p> | <p> | ||
<p class="code" | Run the <code>DUMPCENS</code> EXEC to dump the CENSUS file by entering the following command:</p> | ||
<p class="code">ONLINE BYPASS DUMPCENS | |||
</p> | </p> | ||
<p>The DUMPCENS EXEC follows:</p> | <p> | ||
The <code>DUMPCENS</code> EXEC follows:</p> | |||
<p class="code">&CONTROL OFF | <p class="code">&CONTROL OFF | ||
FILEDEF CLEAR * | FILEDEF CLEAR * | ||
Line 635: | Line 775: | ||
&STACK SYSOPT 128 LIBUFF 600 | &STACK SYSOPT 128 LIBUFF 600 | ||
</p> | </p> | ||
<p>where the CCAIN file, DUMPCENS CCAIN, is:</p> | <p> | ||
where the CCAIN file, DUMPCENS CCAIN, is:</p> | |||
<p class="code">PAGESZ=6184 | <p class="code">PAGESZ=6184 | ||
OPEN CENSUS | OPEN CENSUS | ||
Line 641: | Line 782: | ||
EOJ | EOJ | ||
</p> | </p> | ||
<p>Run RESTCENS EXEC, the EXEC to restore the CENSUS file, by entering:</p> | <p> | ||
<p class="code" | Run the <code>RESTCENS</code> EXEC, the EXEC to restore the <code>CENSUS</code> file, by entering:</p> | ||
<p class="code">ONLINE BYPASS RESTCENS | |||
</p> | </p> | ||
<p>The RESTCENS EXEC follows:</p> | <p> | ||
The <code>RESTCENS</code> EXEC follows:</p> | |||
<p class="code">&CONTROL OFF | <p class="code">&CONTROL OFF | ||
FILEDEF CLEAR * | FILEDEF CLEAR * | ||
Line 658: | Line 801: | ||
&STACK SYSOPT 128 LIBUFF 600 | &STACK SYSOPT 128 LIBUFF 600 | ||
</p> | </p> | ||
<p>where the CCAIN file, RESTCENS CCAIN, is:</p> | <p> | ||
where the CCAIN file, RESTCENS CCAIN, is:</p> | |||
<p class="code">CREATE FILE CENSUS | <p class="code">CREATE FILE CENSUS | ||
END | END | ||
OPEN CENSUS | OPEN CENSUS | ||
RESTORE 128 FROM DUMPCEN | RESTORE 128 FROM DUMPCEN | ||
EOJ | EOJ | ||
</p> | </p> | ||
==Renaming a file== | ==Renaming a file== | ||
<p>The RESTORE command allows you to change the name of a <var class="product">Model 204</var> file. The name cannot be changed simply by changing the DD or DLBL name, or the FILEDEF of the first data set of the file. The renaming operation can be done in one job step with a temporary dump data set. Data set or file definition statements must be included with the old names pointing to the file's data sets. Data set or file definition statements also must be included with the new names pointing to the same data sets. The file is opened under its old name and dumped to the temporary dump data set. The file is then closed. Next, create a file containing the new name, open it, and specify:</p> | <p> | ||
<p class="code" | The <var>[[RESTORE command|RESTORE]]</var> command allows you to change the name of a <var class="product">Model 204</var> file. The name cannot be changed simply by changing the DD or DLBL name, or the FILEDEF of the first data set of the file. The renaming operation can be done in one job step with a temporary dump data set. </p> | ||
<p> | |||
Data set or file definition statements must be included with the old names pointing to the file's data sets. Data set or file definition statements also must be included with the new names pointing to the same data sets. The file is opened under its old name and dumped to the temporary dump data set. The file is then closed. </p> | |||
<p> | |||
Next, create a file containing the new name, open it, and specify:</p> | |||
<p class="code">RESTORE 192 FROM <i>name</i> | |||
</p> | </p> | ||
<p>In the following examples, the CARS file is renamed AUTOS. | <p> | ||
In the following examples, the <code>CARS</code> file is renamed <code>AUTOS</code>. </p> | |||
====z/OS example==== | ====z/OS example==== | ||
<p class="code">//JOB RENAME FILE CARS | <p class="code">//JOB RENAME FILE CARS | ||
Line 679: | Line 831: | ||
//DUMPCARS DD DISP=(NEW,PASS),UNIT=TAPE,VOL=SER=ABCDEF | //DUMPCARS DD DISP=(NEW,PASS),UNIT=TAPE,VOL=SER=ABCDEF | ||
//CCAIN DD * | //CCAIN DD * | ||
user zero parameters | <i>user zero parameters</i> | ||
OPEN CARS | OPEN CARS | ||
DUMP TO DUMPCARS | DUMP TO DUMPCARS | ||
Line 689: | Line 841: | ||
CLOSE ALL | CLOSE ALL | ||
EOJ | EOJ | ||
/* | /* </p> | ||
</p> | <p> | ||
<p>Only the first ddname must be changed when a file is renamed. The above example could be changed to CREATE AUTOS FROM AUTOS,CARS2 and the AUTOS2 DD statement could be omitted.</p> | Only the first ddname must be changed when a file is renamed. The above example could be changed to <code>CREATE AUTOS FROM AUTOS,CARS2</code> and the <code>AUTOS2</code> DD statement could be omitted.</p> | ||
====z/VSE example==== | ====z/VSE example==== | ||
<p class="code">// JOB RENAME FILE CARS | <p class="code">// JOB RENAME FILE CARS | ||
Line 698: | Line 851: | ||
. | . | ||
// DLBL CARS,'M204.FILE.CARS',,DA | // DLBL CARS,'M204.FILE.CARS',,DA | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// DLBL CARS2,'M204.FILE.CARS2',,DA | // DLBL CARS2,'M204.FILE.CARS2',,DA | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// DLBL AUTOS,'M204.FILE.CARS',,DA | // DLBL AUTOS,'M204.FILE.CARS',,DA | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// DLBL AUTOS2,'M204.FILE.CARS2',,DA | // DLBL AUTOS2,'M204.FILE.CARS2',,DA | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// TLBL SYS010,'M204.DUMP.CARS' | // TLBL SYS010,'M204.DUMP.CARS' | ||
// ASSGN SYS010,X'300' | // ASSGN SYS010,X'300' | ||
// DLBL CCASTAT,'M204.CCASTAT' | // DLBL CCASTAT,'M204.CCASTAT' | ||
// EXTENT ,volser | // EXTENT ,<i>volser</i> | ||
// UPSI 10010000 | // UPSI 10010000 | ||
// EXEC BATCH204,SIZE=AUTO | // EXEC BATCH204,SIZE=AUTO | ||
user zero parameters | <i>user zero parameters</i> | ||
LOGIN userid | LOGIN <i>userid</i> | ||
password | <i>password</i> | ||
DEFINE DATASET DUMPCARS WITH SCOPE=SYSTEM FILENAME=SYS010 | DEFINE DATASET DUMPCARS WITH SCOPE=SYSTEM FILENAME=SYS010 | ||
OPEN CARS | OPEN CARS | ||
Line 726: | Line 879: | ||
/* | /* | ||
</p> | </p> | ||
====z/VM example==== | ====z/VM example==== | ||
<p>In z/VM, run the RENAME EXEC by entering the following command:</p> | <p> | ||
<p class="code" | In z/VM, run the <code>RENAME</code> EXEC by entering the following command:</p> | ||
<p class="code">ONLINE BYPASS RENAME | |||
</p> | </p> | ||
<p>The RENAME EXEC follows:</p> | <p> | ||
The <code>RENAME</code> EXEC follows:</p> | |||
<p class="code">&CONTROL OFF | <p class="code">&CONTROL OFF | ||
FILEDEF CLEAR * | FILEDEF CLEAR * | ||
Line 747: | Line 903: | ||
&STACK SYSOPT 128 LIBUFF 600 | &STACK SYSOPT 128 LIBUFF 600 | ||
</p> | </p> | ||
<p>where the CCAIN file, RENAME CCAIN, is:</p> | <p> | ||
where the CCAIN file, RENAME CCAIN, is:</p> | |||
<p class="code">PAGESZ=6184 | <p class="code">PAGESZ=6184 | ||
OPEN CARS | OPEN CARS | ||
Line 756: | Line 913: | ||
OPEN AUTOS | OPEN AUTOS | ||
RESTORE 192 FROM DUMPCARS | RESTORE 192 FROM DUMPCARS | ||
EOJ | EOJ | ||
</p> | </p> | ||
==Backing up and restoring multitape files under z/VM== | ==Backing up and restoring multitape files under z/VM== | ||
<p>Under z/VM, you can use the M204APND and M204LDEF commands, along with FILEDEF and LABELDEF statements, to back up and restore multitape <var class="product">Model 204</var> files.</p> | <p> | ||
<p>This section provides prototypes for backing up and restoring <var class="product">Model 204</var> files that require more than one tape. These prototypes represent components of z/VM EXECs. Modify the prototypes to meet your site's requirements.</p> | Under z/VM, you can use the M204APND and M204LDEF commands, along with FILEDEF and LABELDEF statements, to back up and restore multitape <var class="product">Model 204</var> files.</p> | ||
<p> | |||
This section provides prototypes for backing up and restoring <var class="product">Model 204</var> files that require more than one tape. These prototypes represent components of z/VM EXECs. Modify the prototypes to meet your site's requirements.</p> | |||
===Prototypes for backing up and restoring files=== | ===Prototypes for backing up and restoring files=== | ||
<p>The following prototypes contain only the FILEDEFs, LABELDEFs, M204APNDs, and M204LDEFs required. The following assumptions are made for the prototypes:</p> | <p> | ||
The following prototypes contain only the FILEDEFs, LABELDEFs, M204APNDs, and M204LDEFs required. The following assumptions are made for the prototypes:</p> | |||
<ul> | <ul> | ||
<li>One of the files might span a tape volume, but it is not known which one.</li> | <li>One of the files might span a tape volume, but it is not known which one.</li> | ||
<li>No file spans more than one tape volume.</li> | <li>No file spans more than one tape volume.</li> | ||
</ul> | </ul> | ||
<p>If a given file spans two tape volumes, you must repeat the M204APND and M204LDEF pair for each additional tape. </p> | <p> | ||
<p>The prototypes show two files being backed up or restored, but the prototypes can be extended to back up or restore as many files as necessary. </p> | If a given file spans two tape volumes, you must repeat the <var>M204APND</var> and <var>M204LDEF</var> pair for each additional tape. </p> | ||
<p> | |||
The prototypes show two files being backed up or restored, but the prototypes can be extended to back up or restore as many files as necessary. </p> | |||
====Backup prototype==== | ====Backup prototype==== | ||
<p class="code">FILEDEF file1 TAP1 SL 1 Output data set | <p class="code">FILEDEF file1 TAP1 SL 1 <i>Output data set</i> | ||
LABELDEF file1 FSEQ 1 | LABELDEF file1 FSEQ 1 | ||
M204APND file1 TAP1 SL | M204APND file1 TAP1 SL <i>If a file spans two tape volumes, repeat the </i> | ||
M204LDEF file1 FSEQ 1 | M204LDEF file1 FSEQ 1 <i>M204APND and M204LDEF commands </i> | ||
FILEDEF file2 TAP1 SL 2 (LEAVE | FILEDEF file2 TAP1 SL 2 (LEAVE | ||
LABELDEF file2 FSEQ 2 | LABELDEF file2 FSEQ 2 | ||
M204APND file2 TAP1 SL | M204APND file2 TAP1 SL | ||
M204LDEF file2 FSEQ 2 | M204LDEF file2 FSEQ 2 | ||
</p> | </p> | ||
====Restore prototype==== | ====Restore prototype==== | ||
<p class="code">FILEDEF file1 TAP1 SL 1 | <p class="code">FILEDEF file1 TAP1 SL 1 <i>Input data set</i> | ||
LABELDEF file1 FSEQ 1 VOLID volidx | LABELDEF file1 FSEQ 1 VOLID volidx | ||
M204APND file1 TAP1 SL | M204APND file1 TAP1 SL <i>If a file spans two tape volumes,</i> | ||
M204LDEF file1 FSEQ 1 VOLID volidx | M204LDEF file1 FSEQ 1 VOLID volidx <i>repeat the M204APND and M204LDEF commands </i> | ||
FILEDEF file2 TAP1 SL 2 | FILEDEF file2 TAP1 SL 2 | ||
LABELDEF file2 FSEQ 2 VOLID volidx | LABELDEF file2 FSEQ 2 VOLID volidx | ||
M204APND file2 TAP1 SL | M204APND file2 TAP1 SL | ||
M204LDEF file2 FSEQ 2 VOLID volidx | M204LDEF file2 FSEQ 2 VOLID volidx | ||
</p> | </p> | ||
< | |||
</div> <!-- end of toc limit div --> | |||
[[Category: | [[Category:Model 204 files]] |
Latest revision as of 21:49, 24 July 2017
Overview
The DUMP and RESTORE commands copy file pages from one data set to another. This page describes the DUMP and RESTORE commands and provides examples of a number of their applications.
The DUMP and RESTORE commands are by no means the only way to make backups and copies of Model 204 files. The normal data set backup/restore/copy techniques in use at your site are almost certainly usable against Model 204 files. However, these techniques require exclusive access to the files. Either the files cannot be in any other job while the backup/restore/copy is run, or the job using the files must be quiesced (using the EXTENDED QUIESCE option on the CHECKPOINT command).
DUMP and RESTORE commands
- The Model 204 DUMP command "takes a snapshot" of a Model 204 file at a particular time to create a backup copy of the data.
- Using this copy, the RESTORE command returns the file to its exact state at the time the DUMP was taken.
The Model 204 DUMP/RESTORE facility allows you to perform the following functions on one or more files:
- These functions can be done with any backup technique:
- Recover from disk crashes, operating system crashes, accidentally scratched data sets, and sabotage
- Move a Model 204 file from one device to another
- These functions can only be done with the dump/restore:
- Change the number and size of a file's data sets
- Rename the file
- Rearrange file pages after using an INCREASE command
- Move all file pages into one (larger) data set after an INCREASE DATASETS command.
However, because the DUMP and RESTORE commands do not reorganize the content in any way, they cannot be used to change the file parameters or field attributes or to compact the file.
DUMP and RESTORE product options
The Fast/Backup product provides a plug-compatible replacement for the the DUMP and RESTORE commands. When installed, this product dramatically increases the performance of these commands.
See DUMP and DUMPX and RESTORE and RESTOREX as well as the Fast/Backup User's Guide for more information.
Combining DUMP and RESTORE functions
You can combine many of these functions in a single DUMP and RESTORE run; that is, you can move a file to a new device, resize it, and rename it in a single series of DUMP and RESTORE steps.
Using DUMP and RESTORE with media recovery
If your site uses media recovery to recover files in the event of a media failure, such as a disk head crash, be sure to dump all Model 204 files on a regular basis. In addition, ensure that journals are produced for runs that update files between dumps.
When a dump is taken, Model 204 records the time and date on both the dump data set and the journal data set (if journaling is active). When media recovery is performed, the starting point in the journal for reapplying updates to a file is the first update that occurs after the time and date of the dump data set. (See Tracking system activity (CCAJRNL, CCAAUDIT, CCAJLOG) for information about journaling, and also see the description of the REGENERATE command.)
Dumping files
The DUMP command makes a copy of an open Model 204 file on a sequential data set. This data set can be on either a magnetic tape or a direct access device.
When you enter the DUMP command:
- DUMP waits until all existing transactions that might update the file have completed and the existing copy of the file is in a consistent state.
- Model 204 dumps the file.
- If, while the dump is being taken, a subsequent user request updates the file being dumped, Model 204 dumps preimages of database pages to be updated before the update is allowed. This guarantees that the dumped copy matches the state of the file at the time DUMP began.
Syntax
The format of the DUMP command is:
DUMP TO dumpfile
Where:
dumpfile is the dump file name.
When the DUMP command is issued, it must wait for all updating transactions to complete before it can begin. If a file is being updated, the following message is displayed:
DUMP TO dumpfile *** M204.0602: FILE IS IN USE *** M204.1076: DO YOU REALLY WANT TO TRY AGAIN?
If you reply with Y (yes), Model 204 tries again to enqueue the file. If you reply with N
(no), Model 204 does not try again to enqueue the file, but returns control to you so that you can issue another command. The default response is N.
When the dump begins, Model 204 displays the following message:
*** M204.1760: FILE filename: DUMP BEGINNING at hh:mm:ss
This information also appears on the audit trail.
If DUMP cannot begin for an extended period of time, you can cancel the command in response to the "DO YOU REALLY WANT TO?" message.
If the dump completes without errors, the following message is displayed:
*** M204.1761: FILE filename: DUMP COMPLETED AT hh:mm:ss
Setting up the DUMP/RESTORE utility
Because dumps are often done in batch runs, the BATCH204 module contains the DUMP/RESTORE utility. In addition to the normal JCL or EXEC that the system manager supplies to run BATCH204, the DUMP command requires a DD statement or FILEDEF for the dump file.
Naming DUMP files
Although you can choose any file name, a name that begins with DUMP
is usually used.
DUMP command usage notes
The DUMP command works only in file context, and file manager privileges are required for its use.
The file to be dumped must be opened before issuing DUMP, and then must be closed after DUMP completes.
Errors during file dumps
If errors are detected during the file dump, the dump ends and the following message is displayed:
*** M204.1762: FILE filename: DUMP ENDED ABNORMALLY
Other users of the file are unaffected by DUMP errors and not forced to wait.
Dumping multiple files
More than one Model 204 file can be dumped in one run. Include a DD statement or FILEDEF for each file and for each dump file. Each file can be opened and dumped in turn. Including a CLOSE command after each DUMP prevents overrunning the NFILES parameter. In addition, the CLOSE ensures that one file is not accidentally dumped twice if the subsequent OPEN fails. For example:
OPEN PEOPLE DUMP TO DUMPPEOP CLOSE PEOPLE OPEN CARS DUMP TO DUMPCARS CLOSE CARS
If an error is detected during a DUMP command, the Model 204 job step return code is set to 20.
z/OS considerations
Under the z/OS operating system, the dump file DD statement must contain the following parameters:
- DSNAME
- DISP
- UNIT
- VOLUME
If the data set is on tape, you can use the LABEL parameter.
If the data set is on disk, the SPACE parameter must be present and set equivalent to the amount of space occupied by the Model 204 file.
Omit DCB information unless your site uses blocking as discussed in Blocking DUMP data sets.
Blocking DUMP data sets
DUMP data sets can be blocked. In z/OS, specify a BLKSIZE entry in the DCB parameter in the DD statement. The specified block size must be a multiple of 6184 (that is, PAGESZ). If it is not, Model 204 rounds the block size down to the next multiple of 6184.
As of version 7.5, if the BLKSIZE is zero or is not specified, the z/OS operating system calculates the optimal BLKSIZE. In version 7.4 and earlier, if the BLKSIZE is zero or is not specified, 6184 is used as the default block size.
z/OS example
For example, the following z/OS job step dumps the PEOPLE file to a tape:
//EXEC Include here the basic JCL or cataloged procedure invocation provided by the Model 204 system manager to run BATCH204 //PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=SHR //DUMPPEOP DD DSN=M204.DUMP.PEOPLE, // DISP=(NEW,CATLG,DELETE),UNIT=TAPE, // VOLUME=SER=T12345 //CCAIN DD * PAGESZ=6184 OPEN PEOPLE DUMP TO DUMPPEOP CLOSE PEOPLE EOJ /*
z/VM example
The following z/VM EXEC, DUMPPEOP, assumes that the tape used has already been labeled. To run the EXEC in ONLINE, enter:
ONLINE BYPASS DUMPPEOP
The DUMPPEOP EXEC follows:
&CONTROL OFF FILEDEF * CLEAR FILEDEF CCASNAP PRINTER FILEDEF CCATEMP DISK CCATEMP WORK A ( XTENT 20 LRECL 6184 FILEDEF CCAPRINT DISK DUMPPEOP CCAPRINT A FILEDEF CCAAUDIT DISK DUMPPEOP CCAAUDIT A FILEDEF DUMPPEOP TAP1 SL VOLID 123456 LABELDEF DUMPPEOP VOLID 123456 FILEDEF PEOPLE M DSN M204 FILE PEOPLE FILEDEF CCAIN DISK DUMPPEOP CCAIN * &STACK SYSOPT 128 LIBUFF 600
Sample z/VM CCAIN stream
The DUMPPEOP CCAIN input contains:
PAGESZ=6184 OPEN PEOPLE DUMP TO DUMPPEOP CLOSE PEOPLE EOJ
z/VSE considerations
Any dump data sets that are to be referenced by the DUMP or RESTORE commands must be described in the batch or Online JCL stream with DLBL and EXTENT statements if they are to be disk resident, or with a TLBL statement if the dump data set is to be on magnetic tape.
The file name used for a disk dump data set must be the same as the dump file name referenced in the DUMP command. That is, if the command DUMP TO DUMPTST
is issued to the batch or Online program, a DLBL for file name DUMPTST
must be included in the JCL.
If you want to place the dump data set on tape, issue a DEFINE DATASET command before the DUMP command to establish the relationship between the dump file referenced in the DUMP command and the file name used on the TLBL statement.
Dump data set characteristics
The default characteristics of the dump data set are:
Characteristic | Value |
---|---|
Logical record length | 6184 (value of Model 204 PAGESZ parameter) |
Physical block size | 6184 |
Record format | Fixed blocked |
The only parameter that can be overridden with the DEFINE DATASET command is the physical block size. To alter the block size, issue the DEFINE DATASET command before the DUMP or RESTORE command.
Positioning the tape
These commands do not perform any tape positioning. Position the tape through the MTC (Magnetic Tape Command) JCL statement in the startup JCL for the batch or Online program.
z/VSE example
The following example of the DUMP command is used to dump to tape:
// JOB ONLINE WITH TAPE DUMP . . . // TLBL SYS006,'M204.DUMP.PEOPLE' // ASSGN SYS006,X'cuu' // DLBL PEOPLE,'M204.DATABASE.TO.DUMP',,DA // EXTENT SYS005 // EXEC ONLINE,SIZE=AUTO user zero parameters LOGIN userid password OPEN PEOPLE DEFINE DATASET DUMPPEOP WITH SCOPE=SYSTEM DDNAME=SYS006 DUMP TO DUMPPEOP CLOSE ALL EOJ /* /&
Restoring files
The RESTORE command takes the sequential data set produced by a DUMP command and turns it back into a Model 204 file. The BATCH204 module normally is used in a batch run, and the JCL or EXEC must include data set or file definition statements for the data sets of the Model 204 file and the dump data set.
Syntax
The format of the RESTORE command is:
RESTORE [options] FROM name
Where:
- options are expressed as a decimal number. The RESTORE options are as follows:
Option Meaning 128 Size of a file data set or the number of data sets in a file is being changed. 192 Name of a file is being changed. - name is the dump data set or dump file name from which the Model 204 file is being restored.
Usage
A private or semipublic file is automatically closed after being restored. Public files remain open.
The RESTORE command can be issued from within a procedure.
Informational and error messages
Messages inform you when the RESTORE begins and ends. If an error is detected during a RESTORE command, the Model 204 job step return code is set to 20.
Restoring to original data sets
In the event of a system crash or inadvertently administered file updates (for example, a user accidentally initializes a file), you might want to restore the file to its state at the time of the last dump.
If the file's data sets are still in the same location and have not been damaged physically, you can open the file and use RESTORE FROM name
without specifying any options.
z/OS example
//EXEC Include here the basic JCL or cataloged procedure invocation provided by the Model 204 system manager to run BATCH204. //PEOPLE DD DSN=M204.FILE.PEOPLE,DISP=SHR //DUMPPEOP DD DSN=M204.DUMP.PEOPLE, // DISP=OLD,UNIT=TAPE,VOLUME=SER=T12345 //CCAIN DD * PAGESZ=6184 OPEN PEOPLE RESTORE FROM DUMPPEOP EOJ /*
z/VSE example
//JOB BATCH204 RESTORE FROM TAPE DUMP . . . // TLBL SYS006,'M204.DUMP.PEOPLE' // ASSGN SYS006,X'cuu' // DLBL PEOPLE,'M204.RESTORE.FROM.DUMP',,DA // EXTENT SYS005 // EXEC BATCH204,SIZE=AUTO user zero parameters LOGIN userid password OPEN PEOPLE DEFINE DATASET DUMPPEOP WITH SCOPE=SYSTEM DDNAME=SYS006 RESTORE FROM DUMPPEOP CLOSE ALL EOJ /* /&
z/VM example
For z/VM, using the dump file (DUMPPEOP) created in the z/VM example on z/VM example, a RESTORE EXEC follows. Issue the command ONLINE BYPASS RESTORE to invoke the following EXEC:
&CONTROL OFF FILEDEF * CLEAR FILEDEF CCASNAP PRINTER FILEDEF CCATEMP DISK CCATEMP WORK A ( XTENT 20 LRECL 6184 FILEDEF CCAPRINT DISK RESTPEOP CCAPRINT A FILEDEF CCAUDIT DISK RESTPEOP CCAAUDIT A FILEDEF DUMPPEOP TAP1 SL VOLID 123456 LABELDEF DUMPPEOP VOLID 123456 FILEDEF PEOPLE M DSN M204 FILE PEOPLE FILEDEF CCAIN DISK RESTPEOP CCAIN * &STACK SYSOPT 128 LIBUFF 600
where the RESTPEOP CCAIN input contains:
PAGESZ=6184 OPEN PEOPLE RESTORE 128 FROM DUMPPEOP CLOSE PEOPLE EOJ
Restoring to new data sets
If one or more file data sets are physically damaged by a disk crash or are accidentally overwritten, you might need to reallocate the data sets and restore the file. Follow these steps:
- Reallocate the data sets with exactly the same number of pages that they had originally. (If the size of a data set must be changed, see Changing the size or number of file data sets.)
- Re-create the file. The CREATE command properly formats the tracks of the new data set. Without the CREATE, RESTORE can cause a TROUBLE WITH DISK I/O error message to appear.
Let parameters default to their default values. RESTORE resets all parameters to their dumped values.
To skew files, specify the X'40' bit of the FILEORG parameter with the CREATE command.
- Open and restore the file with the 128 option. The syntax for the 128 option is:
RESTORE 128 FROM ddname
z/OS example
In the following z/OS example, a two-data set file, CARS, has its data sets reallocated:
//EXEC PGM=BATCH204 //CARS DD DSN=M204.FILE.CARS,DISP=SHR //CARS2 DD DSN=M204.FILE.CARS2,DISP=SHR //DUMPCARS DD DSN=M204.DUMP.CARS,DISP=OLD, // UNIT=TAPE,VOL=SER=987654 //CCAIN DD * PAGESZ=6184 CREATE FILE CARS FROM CARS,CARS2 END OPEN CARS RESTORE 128 FROM DUMPCARS EOJ /*
z/VSE example
// JOB RESTORE FILE CARS . . . // DLBL CARS,'M204.FILE.CARS',,DA // EXTENT ,volser // DLBL CARS2,'M204.FILE.CARS2',,DA // EXTENT ,volser // TLBL SYS010,'M204.DUMP.CARS' // ASSGN SYS010,X'300' // DLBL CCASTAT,'M204.CCASTAT' // EXTENT ,volser // UPSI 10010000 // EXEC BATCH204,SIZE=AUTO PAGESIZE=6184 LOGIN userid password DEFINE DATASET DUMPCARS WITH SCOPE=SYSTEM FILENAME=SYS010 CREATE FILE CARS FROM CARS,CARS2 END OPEN CARS RESTORE 128 FROM DUMPCARS EOJ /* /&
z/VM example
For z/VM, run the following NEWCARS
EXEC by entering the following command:
ONLINE BYPASS NEWCARS
The NEWCARS
EXEC and its associated CCAIN input follow:
&CONTROL OFF FILEDEF CLEAR * FILEDEF CCASNAP PRINTER FILEDEF CCATEMP DISK CCATEMP WORK (XTENT 20 LRECL 6184 FILEDEF CCASTAT M DSN WORK CCASTAT FILEDEF CCAPRINT DISK NEWCARS CCAPRINT A FILEDEF CCAAUDIT DISK NEWCARS CCAAUDIT A FILEDEF DUMPCARS TAP1 SL VOLID 123456 LABELDEF DUMPCARS VOLID 123456 FILEDEF CARS M DSN M204 FILE CARS FILEDEF CARS2 M DSN M204 FILE CARS2 FILEDEF CCAIN DISK NEWCARS CCAIN A &STACK SYSOPT 128 LIBUFF 600
The NEWCARS
CCAIN file contains:
PAGESIZE=6184 LOGIN userid password CREATE FILE CARS FROM CARS,CARS2 END OPEN CARS RESTORE 128 FROM DUMPCARS EOJ
Moving Model 204 files
In most cases, use the Model 204 DUMP/RESTORE utility to move Model 204 files. Remember that you can combine DUMP and RESTORE functions; for example, you can move files to new data sets and resize them in the same set of steps.
The instructions for moving files with the Model 204 DUMP/RESTORE utility follow.
When can you use IBM move and copy utilities?
You can use the IBM utilities (IEHMOVE and IEBGENER for z/OS users, or a copy utility such as DITTO for z/VSE users) except when a skewed file is being moved to a different device type.
If you use a non-Model 204 utility to move a skewed file from one device type to another (for example, from a 3350 to a 3380) you will not be able to open the file.
Under the same limitations you can also use the IBM utility DFDSS, if you specify ALLEXCP and do not specify TOL(ENQF).
Using DUMP and RESTORE to move files
Follow these steps to use DUMP/RESTORE to move files:
- Allocate new data set(s) for the file. Ensure that the number of data sets does not change and that each new data set has the same number of pages as the corresponding old data set. (See Changing the size or number of file data sets for more information.)
- Dump the file to a dump data set or dump file using data set or file definition statements pointing to the old data sets or files.
- Execute a separate job step with the new data sets or files, recreating the file and restoring from the dump data set or dump file. Unless the FILEORG parameter X'40' bit is turned on along with the CREATE command prior to the RESTORE, restored files are not skewed. The DD, DLBL, or FILEDEF names for the file must be identical to the old ones.
z/OS example
For z/OS, the following job moves a three-data set file:
//EXEC PGM=BATCH204 //PARTS DD DSN=M204.FILE.PARTS,DISP=SHR //PARTS2 DD DSN=M204.FILE.PARTS2,DISP=SHR //PARTS3 DD DSN=M204.FILE.PARTS3.DISP=SHR //DUMPPART DD DSN=M204.DUMP.PARTS,DISP=(NEW,PASS), // UNIT=TAPE, VOL=SER=T00001 //CCAIN DD * user zero parameters OPEN PARTS DUMP TO DUMPPART CLOSE ALL EOJ /* //EXEC PGM=BATCH204 //PARTS DD DSN=M204.FILE.NEWPARTS,DISP=SHR //PARTS2 DD DSN=M204.FILE.NEWPARTS2,DISP=SHR //PARTS3 DD DSN=M204.FILE.NEWPARTS3,DISP=SHR //DUMPPART DD DSN=M204.DUMP.PARTS,DISP=(OLD,KEEP), // UNIT=TAPE,VOL=SER=T00001 //CCAIN DD * user zero parameters CREATE FILE PARTS FROM PARTS,PARTS2,PARTS3 END OPEN PARTS RESTORE 128 FROM DUMPPART CLOSE ALL EOJ /*
z/VSE example
// JOB MOVE FILE PARTS . . . // DLBL PARTS,'M204.FILE.PARTS',,DA // EXTENT ,volser // TLBL SYS010,'M204.DUMP.PARTS' // ASSGN SYS010,X'300' // DLBL CCASTAT,'M204.CCASTAT' // EXTENT ,volser // UPSI 10010000 // EXEC BATCH204,SIZE=AUTO user zero parameters LOGIN userid password DEFINE DATASET DUMPPART WITH SCOPE=SYSTEM FILENAME=SYS010 OPEN PARTS DUMP TO DUMPPART CLOSE ALL EOJ /* . . . // DLBL PARTS,'M204.FILE.NEWPARTS',,DA // EXTENT ,volser // TLBL SYS010,'M204.DUMP.PARTS' // ASSGN SYS010,X'300' // DLBL CCASTAT,'M204.CCASTAT' // EXTENT ,volser // UPSI 10010000 // EXEC BATCH204,SIZE=AUTO user zero parameters LOGIN userid password DEFINE DATASET DUMPPART WITH SCOPE=SYSTEM FILENAME=SYS010 CREATE FILE PARTS END OPEN PARTS RESTORE 128 FROM DUMPPART CLOSE ALL EOJ /* /&
z/VM example
In z/VM, with the previously allocated and created PARTS, PARTS2, and PARTS3 files and dump file M204.DUMP.PARTS, use the DUMPPART EXEC to dump PARTS into the dump file by using the following command:
ONLINE BYPASS DUMPPART
The DUMPPART EXEC follows:
&CONTROL OFF FILEDEF * CLEAR FILEDEF CCASNAP PRINTER FILEDEF CCATEMP DISK CCATEMP WORK A ( XTENT 20 LRECL 6184 FILEDEF CCAPRINT DISK DUMPPART CCAPRINT A FILEDEF CCAAUDIT DISK DUMPPART CCAAUDIT A FILEDEF DUMPPART TAP1 SL VOLID 123456 LABELDEF DUMPPART VOLID 123456 FILEDEF PARTS M DSN M204 FILE PARTS FILEDEF PARTS2 M DSN M204 FILE PARTS2 FILEDEF PARTS3 M DSN M204 FILE PARTS3 FILEDEF CCAIN DISK DUMPPART CCAIN A &STACK SYSOPT 128 LIBUFF 600
where the DUMPPART CCAIN input contains:
PAGESZ=6184 OPEN PARTS DUMP TO DUMPPART CLOSE PARTS EOJ
Then re-create and restore PARTS from the dump file using the RESTPART EXEC invoked by the following command:
ONLINE BYPASS RESTPART
The RESTPART EXEC follows:
&TRACE OFF FILEDEF * CLEAR FILEDEF CCASNAP PRINTER FILEDEF CCATEMP DISK CCATEMP WORK A ( XTENT 20 LRECL 6184 FILEDEF CCAPRINT DISK RESTPART CCAPRINT A FILEDEF CCAUDIT DISK RESTPART CCAAUDIT A FILEDEF DUMPPART TAP1 SL VOLID 123456 LABELDEF DUMPPART VOLID 123456 FILEDEF PARTS M DSN M204 FILE PARTS FILEDEF PARTS2 M DSN M204 FILE PARTS2 FILEDEF PARTS3 M DSN M204 FILE PARTS3 FILEDEF CCAIN DISK RESTPART CCAIN A &STACK SYSOPT 128 LIBUFF 600
where the RESTPART CCAIN input contains:
PAGESZ=6184 CREATE FILE PARTS FROM PARTS,PARTS2,PARTS3 END OPEN PARTS RESTORE 128 FROM DUMPPART CLOSE PARTS EOJ
Changing the size or number of file data sets
The RESTORE command allows you to change the size of a file data set or the number of data sets in the file. (You can also use the INCREASE command to add data sets to the file.
To change the size or number of file data sets:
- Dump the file as it currently exists.
- Allocate or reallocate the desired data sets. The total number of pages in the file can increase or decrease, but they must not be less than the sum of the current values of the parameters:
8 + ASIZE + BSIZE + CSIZE + DSIZE
The values of these parameters cannot be changed with DUMP/RESTORE. BSIZE and DSIZE, however, can be changed with the INCREASE and DECREASE commands. All changes in the total number of pages allocated are reflected in the viewable parameter FREESIZE, which indicates the number of unassigned pages.
- Run a job step that includes data set or file definition statements for the new data sets. This job re-creates the file from the new data sets, opens the file, and restores it from the dump data set, specifying the option 128 (that is, RESTORE 128 FROM name).
z/OS example
For example, the CENSUS file consists of five data sets, but you can consolidate them to one, reducing the number of data set or file definition statements required when using the file:
//JOB CONSOLIDATE CENSUS FILES //EXEC... //CENSUS DD DSN=M204.FILE.CENFCT,DISP=SHR //CENA DD DSN=M204.FILE.CENSUSA,DISP=SHR //CENB DD DSN=M204.FILE.CENSUSB,DISP=SHR //CENC DD DSN=M204.FILE.CENSUSC,DISP=SHR //CEND DD DSN=M204.FILE.CENSUSD,DISP=SHR //DUMPCEN DD DSN=M204.DUMP.CENSUS, // DISP=(NEW,PASS),UNIT=TAPE,VOL=SER=ABCDEF //CCAIN DD * user zero parameters OPEN CENSUS DUMP TO DUMPCEN CLOSE ALL EOJ /* // EXEC... //CENSUS DD DSN=M204.FILE.CENSUS, // DISP=(NEW,CATLG),UNIT=2314, // VOL=SER=ABCDEF // SPACE=(TRK,543,,CONTIG) //DUMPCEN DD DSN=M204.DUMP.CENSUS,DISP=(OLD,KEEP), // UNIT=TAPE,VOL=SER=ABCDEF //CCAIN DD * user zero parameters CREATE FILE CENSUS END OPEN CENSUS RESTORE 128 FROM DUMPCEN CLOSE ALL EOJ /*
z/VSE example
// JOB CONSOLIDATE FILE CENSUS . . . // DLBL CENSUS,'M204.FILE.CENFCT',,DA // EXTENT ,volser // DLBL CENA,'M204.FILE.CENSUSA',,DA // EXTENT ,volser // DLBL CENB,'M204.FILE.CENSUSB',,DA // EXTENT ,volser // DLBL CENC,'M204.FILE.CENSUSC',,DA // EXTENT ,volser // DLBL CEND,'M204.FILE.CENSUSD',,DA // EXTENT ,volser // TLBL SYS010,'M204.DUMP.CENSUS' // ASSGN SYS010,X'300' // DLBL CCASTAT,'M204.CCASTAT' // EXTENT ,volser // UPSI 10010000 // EXEC BATCH204,SIZE=AUTO user zero parameters LOGIN userid password DEFINE DATASET DUMPCEN WITH SCOPE=SYSTEM FILENAME=SYS010 OPEN CENSUS DUMP TO DUMPCEN CLOSE ALL EOJ /* . . . // DLBL CENSUS,'M204.FILE.CENSUS',,DA // EXTENT ,volser // TLBL SYS010,'M204.DUMP.CENSUS' // ASSGN SYS010,X'300' // DLBL CCASTAT,'M204.CCASTAT' // EXTENT ,volser // UPSI 10010000 // EXEC BATCH204,SIZE=AUTO user zero parameters LOGIN userid password DEFINE DATASET DUMPCEN WITH SCOPE=SYSTEM - FILENAME=SYS010 CREATE FILE CENSUS END OPEN CENSUS RESTORE 128 FROM DUMPCEN CLOSE ALL EOJ /* /&
z/VM example
For z/VM, allocate the CENSUS file using the following command:
M204UTIL ALLOCATE M204 FILE CENSUS M (PRIMARY 543 TRK
Run the DUMPCENS
EXEC to dump the CENSUS file by entering the following command:
ONLINE BYPASS DUMPCENS
The DUMPCENS
EXEC follows:
&CONTROL OFF FILEDEF CLEAR * FILEDEF CCASNAP PRINTER FILEDEF CCATEMP DISK CCATEMP WORK ( XTENT 20 LRECL 6184 FILEDEF CCASTAT M DSN WORK CCASTAT FILEDEF CCAPRINT DISK DUMPCENS CCAPRINT A FILEDEF CCAAUDIT DISK DUMPCENS CCAAUDIT A FILEDEF CENSUS M DSN M204 FILE CENFCT FILEDEF CENA M DSN M204 FILE CENSUSA FILEDEF CENB M DSN M204 FILE CENSUSB FILEDEF CENC M DSN M204 FILE CENSUSC FILEDEF CEND M DSN M204 FILE CENSUSD FILEDEF DUMPCEN TAP1 SL VOLID 123456 LABELDEF DUMPCEN VOLID 123456 FILEDEF CCAIN DISK DUMPCENS CCAIN A &STACK SYSOPT 128 LIBUFF 600
where the CCAIN file, DUMPCENS CCAIN, is:
PAGESZ=6184 OPEN CENSUS DUMP TO DUMPCEN EOJ
Run the RESTCENS
EXEC, the EXEC to restore the CENSUS
file, by entering:
ONLINE BYPASS RESTCENS
The RESTCENS
EXEC follows:
&CONTROL OFF FILEDEF CLEAR * FILEDEF CCASNAP PRINTER FILEDEF CCATEMP DISK CCATEMP WORK ( XTENT 20 LRECL 6184 FILEDEF CCASTAT M DSN WORK CCASTAT FILEDEF CCAPRINT DISK RESTCENS CCAPRINT A FILEDEF CCAAUDIT DISK RESTCENS CCAAUDIT A FILEDEF CENSUS M DSN M204 FILE CENSUS FILEDEF DUMPCEN TAP1 SL VOLID 123456 LABELDEF DUMPCEN VOLID 123456 FILEDEF CCAIN DISK RESTCENS CCAIN A &STACK SYSOPT 128 LIBUFF 600
where the CCAIN file, RESTCENS CCAIN, is:
CREATE FILE CENSUS END OPEN CENSUS RESTORE 128 FROM DUMPCEN EOJ
Renaming a file
The RESTORE command allows you to change the name of a Model 204 file. The name cannot be changed simply by changing the DD or DLBL name, or the FILEDEF of the first data set of the file. The renaming operation can be done in one job step with a temporary dump data set.
Data set or file definition statements must be included with the old names pointing to the file's data sets. Data set or file definition statements also must be included with the new names pointing to the same data sets. The file is opened under its old name and dumped to the temporary dump data set. The file is then closed.
Next, create a file containing the new name, open it, and specify:
RESTORE 192 FROM name
In the following examples, the CARS
file is renamed AUTOS
.
z/OS example
//JOB RENAME FILE CARS // EXEC PGM=BATCH204 //CARS DD DSN=M204.FILE.CARS,DISP=SHR //CARS2 DD DSN=M204.FILE.CARS2,DISP=SHR //AUTOS DD DSN=M204.FILE.CARS,DISP=SHR //AUTOS2 DD DSN=M204.FILE.CARS2,DISP=SHR //DUMPCARS DD DISP=(NEW,PASS),UNIT=TAPE,VOL=SER=ABCDEF //CCAIN DD * user zero parameters OPEN CARS DUMP TO DUMPCARS CLOSE CARS CREATE FILE AUTOS FROM AUTOS,AUTOS2 END OPEN AUTOS RESTORE 192 FROM DUMPCARS CLOSE ALL EOJ /*
Only the first ddname must be changed when a file is renamed. The above example could be changed to CREATE AUTOS FROM AUTOS,CARS2
and the AUTOS2
DD statement could be omitted.
z/VSE example
// JOB RENAME FILE CARS . . . // DLBL CARS,'M204.FILE.CARS',,DA // EXTENT ,volser // DLBL CARS2,'M204.FILE.CARS2',,DA // EXTENT ,volser // DLBL AUTOS,'M204.FILE.CARS',,DA // EXTENT ,volser // DLBL AUTOS2,'M204.FILE.CARS2',,DA // EXTENT ,volser // TLBL SYS010,'M204.DUMP.CARS' // ASSGN SYS010,X'300' // DLBL CCASTAT,'M204.CCASTAT' // EXTENT ,volser // UPSI 10010000 // EXEC BATCH204,SIZE=AUTO user zero parameters LOGIN userid password DEFINE DATASET DUMPCARS WITH SCOPE=SYSTEM FILENAME=SYS010 OPEN CARS DUMP TO DUMPCARS CLOASE CARS CREATE FILE AUTOS FROM AUTOS,AUTOS2 END OPEN AUTOS RESTORE 192 FROM DUMPCARS CLOSE ALL EOJ /*
z/VM example
In z/VM, run the RENAME
EXEC by entering the following command:
ONLINE BYPASS RENAME
The RENAME
EXEC follows:
&CONTROL OFF FILEDEF CLEAR * FILEDEF CCASNAP PRINTER FILEDEF CCATEMP DISK CCATEMP WORK ( XTENT 20 LRECL 6184 FILEDEF CCASTAT M DSN WORK CCASTAT FILEDEF CCAPRINT DISK RENAME CCAPRINT A FILEDEF CCAAUDIT DISK RENAME CCAAUDIT A FILEDEF CARS M DSN M204 FILE CARS FILEDEF CARS2 M DSN M204 FILE CARS2 FILEDEF AUTOS M DSN M204 FILE CARS FILEDEF AUTOS2 M DSN M204 FILE CARS2 FILEDEF DUMPCARS TAP1 SL VOLID 123456 LABELDEF DUMPCARS VOLID 123456 FILEDEF CCAIN DISK RENAME CCAIN A &STACK SYSOPT 128 LIBUFF 600
where the CCAIN file, RENAME CCAIN, is:
PAGESZ=6184 OPEN CARS DUMP TO DUMPCARS CLOSE CARS CREATE FILE AUTOS FROM AUTO,AUTOS2 END OPEN AUTOS RESTORE 192 FROM DUMPCARS EOJ
Backing up and restoring multitape files under z/VM
Under z/VM, you can use the M204APND and M204LDEF commands, along with FILEDEF and LABELDEF statements, to back up and restore multitape Model 204 files.
This section provides prototypes for backing up and restoring Model 204 files that require more than one tape. These prototypes represent components of z/VM EXECs. Modify the prototypes to meet your site's requirements.
Prototypes for backing up and restoring files
The following prototypes contain only the FILEDEFs, LABELDEFs, M204APNDs, and M204LDEFs required. The following assumptions are made for the prototypes:
- One of the files might span a tape volume, but it is not known which one.
- No file spans more than one tape volume.
If a given file spans two tape volumes, you must repeat the M204APND and M204LDEF pair for each additional tape.
The prototypes show two files being backed up or restored, but the prototypes can be extended to back up or restore as many files as necessary.
Backup prototype
FILEDEF file1 TAP1 SL 1 Output data set LABELDEF file1 FSEQ 1 M204APND file1 TAP1 SL If a file spans two tape volumes, repeat the M204LDEF file1 FSEQ 1 M204APND and M204LDEF commands FILEDEF file2 TAP1 SL 2 (LEAVE LABELDEF file2 FSEQ 2 M204APND file2 TAP1 SL M204LDEF file2 FSEQ 2
Restore prototype
FILEDEF file1 TAP1 SL 1 Input data set LABELDEF file1 FSEQ 1 VOLID volidx M204APND file1 TAP1 SL If a file spans two tape volumes, M204LDEF file1 FSEQ 1 VOLID volidx repeat the M204APND and M204LDEF commands FILEDEF file2 TAP1 SL 2 LABELDEF file2 FSEQ 2 VOLID volidx M204APND file2 TAP1 SL M204LDEF file2 FSEQ 2 VOLID volidx