ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/cpytotap.htm

588 lines
24 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Copy To Tape (CPYTOTAP)</title>
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body bgcolor="white">
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<a name="CPYTOTAP.Top_Of_Page"></a>
<h2>Copy To Tape (CPYTOTAP)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>No
</td>
<td valign="top" align="right">
<a href="#CPYTOTAP.PARAMETERS.TABLE">Parameters</a><br>
<a href="#CPYTOTAP.COMMAND.EXAMPLES">Examples</a><br>
<a href="#CPYTOTAP.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="CPYTOTAP"></a>
<p>The Copy To Tape (CPYTOTAP) command copies records to a tape file. The to-file must be a tape file. The from-file can be a physical, logical, DDM, diskette, tape, or an inline data file.
</p>
<p>
<b>Note: </b>For more information on DDM files, see the Distributed Data Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
<p>This command offers a subset of the parameters available on the Copy File (CPYF) command, along with more specific tape-oriented parameters.
</p>
<p><b>Restriction:</b> A file's open data path (ODP) cannot be shared with any other program in the job (routing step) during the copy operation.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="CPYTOTAP.PARAMETERS.TABLE">Parameters</a></h3>
<table border="1" cellpadding="4" cellspacing="0">
<!-- col1="10" col2="15" col3="30" col4="10" -->
<tr>
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#CPYTOTAP.FROMFILE"><b>FROMFILE</b></a></td>
<td valign="top">From file</td>
<td valign="top"><i>Qualified object name</i></td>
<td valign="top" rowspan="3">Required, Positional 1</td>
</tr>
<tr>
<td valign="top">Qualifier 1: From file</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top" rowspan="3"><a href="#CPYTOTAP.TOFILE"><b>TOFILE</b></a></td>
<td valign="top">Tape file</td>
<td valign="top"><i>Qualified object name</i></td>
<td valign="top" rowspan="3">Required, Positional 2</td>
</tr>
<tr>
<td valign="top">Qualifier 1: Tape file</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top"><a href="#CPYTOTAP.FROMMBR"><b>FROMMBR</b></a></td>
<td valign="top">From member</td>
<td valign="top"><i>Generic name, name</i>, <b><u>*FIRST</u></b>, *ALL</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CPYTOTAP.TOSEQNBR"><b>TOSEQNBR</b></a></td>
<td valign="top">File sequence number</td>
<td valign="top">1-16777215, <b><u>*TAPF</u></b>, *END</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CPYTOTAP.TOLABEL"><b>TOLABEL</b></a></td>
<td valign="top">Tape label</td>
<td valign="top"><i>Character value</i>, <b><u>*FROMMBR</u></b>, *TAPF, *NONE</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CPYTOTAP.TODEV"><b>TODEV</b></a></td>
<td valign="top">Device</td>
<td valign="top">Single values: <b><u>*TAPF</u></b><br>Other values (up to 4 repetitions): <i>Name</i></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="2"><a href="#CPYTOTAP.TOREELS"><b>TOREELS</b></a></td>
<td valign="top">Copy to reels</td>
<td valign="top"><i>Element list</i></td>
<td valign="top" rowspan="2">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Label processing type</td>
<td valign="top">
<b><u>*TAPF</u></b>, *SL, *NL, *LTM</td>
</tr>
<tr>
<td valign="top"><a href="#CPYTOTAP.TORCDLEN"><b>TORCDLEN</b></a></td>
<td valign="top">Record length</td>
<td valign="top"><i>Integer</i>, *TAPF, *CALC, <b><u>*FROMFILE</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CPYTOTAP.TOENDOPT"><b>TOENDOPT</b></a></td>
<td valign="top">End of tape option</td>
<td valign="top"><b><u>*TAPF</u></b>, *REWIND, *UNLOAD, *LEAVE</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CPYTOTAP.TOVOL"><b>TOVOL</b></a></td>
<td valign="top">Volume identifier</td>
<td valign="top">Single values: <b><u>*TAPF</u></b>, *NONE<br>Other values (up to 50 repetitions): <i>Character value</i></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CPYTOTAP.TOBLKLEN"><b>TOBLKLEN</b></a></td>
<td valign="top">Block length</td>
<td valign="top">1-524288, <b><u>*TAPF</u></b>, *CALC</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CPYTOTAP.TORCDBLK"><b>TORCDBLK</b></a></td>
<td valign="top">Record block type</td>
<td valign="top"><b><u>*TAPF</u></b>, *F, *FB, *V, *VB, *D, *DB, *VS, *VBS, *U</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CPYTOTAP.TOEXPDATE"><b>TOEXPDATE</b></a></td>
<td valign="top">File expiration date</td>
<td valign="top"><i>Date</i>, <b><u>*TAPF</u></b>, *PERM</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CPYTOTAP.NBRRCDS"><b>NBRRCDS</b></a></td>
<td valign="top">Number of records to copy</td>
<td valign="top"><i>Unsigned integer</i>, <b><u>*END</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CPYTOTAP.COMPACT"><b>COMPACT</b></a></td>
<td valign="top">Data compaction</td>
<td valign="top"><b><u>*TAPF</u></b>, *NO</td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="CPYTOTAP.FROMFILE"></a>
<h3>From file (FROMFILE)</h3>
<p>Specifies the name and library of the physical file, logical file, diskette file, or tape file, from which records are copied.
</p>
<p>The possible library values are:
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the job is used to locate the physical file, logical file, diskette file, or tape file. If no library is specified as the current library for the job, the QGPL library is used.
</dd>
<dt><b><i>library-name</i></b></dt>
<dd>Specify the name of the library where the physical file, logical file, diskette file, or tape file, is located.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CPYTOTAP.TOFILE"></a>
<h3>Tape file (TOFILE)</h3>
<p>Specifies the file that receives the copied records.
</p>
<p>The possible library values are:
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the job is used to locate the tape file. If no library is specified as the current library for the job, QGPL library is used.
</dd>
<dt><b><i>library-name</i></b></dt>
<dd>Specify the name of the library where the tape file is located.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CPYTOTAP.FROMMBR"></a>
<h3>From member (FROMMBR)</h3>
<p>Specifies the database members or the identifiers of the diskette data tape file or the tape file members copied from the from-file. If the from-file is a spooled inline file, *FIRST must be specified for this parameter.
</p>
<dl>
</dl>
<dl>
<dt><b>*FIRST</b></dt>
<dd>The first member of the specified file is used.
</dd>
</dl>
<dl>
<dt><b>*ALL</b></dt>
<dd>All members of a database from-file, or all file label identifiers for a diskette from-file are copied. FROMMBR(*ALL) is not valid for a tape file or inline data file.
</dd>
<dt><b><i>from-member-name</i></b></dt>
<dd>Specify the name of the database file member or the label of a tape or diskette data file identifier that is being copied. If the tape label identifier of the tape or diskette file that is copied contains special characters or is greater than 10 characters in length, then it must be specified on the CRTTAPF, CHGTAPF, or OVRTAPF command for the device file.
</dd>
<dt><b><i>generic*-member-name</i></b></dt>
<dd>Specify the generic name of the set of database members or diskette labels that are being copied.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CPYTOTAP.TOSEQNBR"></a>
<h3>File sequence number (TOSEQNBR)</h3>
<p>Specifies the sequence number of the data file that receives the copied records.
</p>
<dl>
<dt><b><u>*TAPF</u></b></dt>
<dd>The sequence number specified in the tape file is used.
</dd>
<dt><b>*END</b></dt>
<dd>Records are copied until the end-of-file condition is indicated.
<p>For a labeled tape file, the label specified on the TOLABEL parameter must be found at this sequence number. Valid sequence numbers range from 1 through 16777215.
</p>
<p>If a new data file is added to the tape to-file, the sequence number must be one higher than the sequence number of the last data file on that volume. No gaps are allowed in the series of sequence numbers. If a sequence number of an existing data file is specified, that file is overwritten, and all following files on the volume are destroyed.
</p>
</dd>
<dt><b><i>file-sequence-number</i></b></dt>
<dd>Specify the sequence number of the data file that receives the copied records. Valid sequence numbers range from 1 through 16777215.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CPYTOTAP.TOLABEL"></a>
<h3>Tape label (TOLABEL)</h3>
<p>Specifies the label of the data file that receives the copied records. This data file identifier is ignored for a nonlabeled tape.
</p>
<dl>
<dt><b><u>*FROMMBR</u></b></dt>
<dd>The receiving data file in the to-file has the same label as the member/label copied from the from-file. If a member/label name was specified as a value for the FROMMBR parameter (or implied by (*TAPF)), then a data-file with the same name in the tape to-file receives the copied records. If a generic name or *ALL is specified as a value for the FROMMBR parameter, then this value is not valid.
<p>If the from-file is a nonlabeled tape file, a label identifier is created for the tape to-file in the form of CPYnnnnn, where nnnnn is the tape sequence number of the data file.
</p>
</dd>
<dt><b>*TAPF</b></dt>
<dd>The label value specified in the tape file or on an override is used to identify the label that receives the copied records.
</dd>
<dt><b>*NONE</b></dt>
<dd>No data file identifier is specified. *NONE is not valid if the to-file tape has standard labels.
</dd>
<dt><b><i>data-file-identifier</i></b></dt>
<dd>Specify the label value that identifies the data file to receive the copied records.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CPYTOTAP.TODEV"></a>
<h3>Device (TODEV)</h3>
<p>Specifies the names of devices that are used to copy records to the tape to-file.
</p>
<dl>
<dt><b><u>*TAPF</u></b></dt>
<dd>The devices specified in the tape file description are used.
</dd>
<dt><b><i>device-name</i></b></dt>
<dd>Specify the names of up to four tape devices, one virtual tape device, or one media library device used when writing records to the tape to-file. The order in which the device names are specified is the order in which tapes on the devices are successively written to the tape to-file. Each device must have been defined in a device description (by using the Create Device Description (CRTDEVD) command) before being specified on this command.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CPYTOTAP.TOREELS"></a>
<h3>Copy to reels (TOREELS)</h3>
<p>Specifies the type of labeling used on the tape reels that receive the copied records. This system writes only to standard-label tape or to nonlabeled tapes.
</p>
<dl>
<dt><b><u>*TAPF</u></b></dt>
<dd>The value specified in the tape file for the to-file is used.
</dd>
<dt><b>*SL</b></dt>
<dd>The volume used for receiving copied records has standard labels.
</dd>
<dt><b>*NL</b></dt>
<dd>The volume used has no labels. Tape marks are used to indicate the end of each volume and the data file on each volume.
</dd>
<dt><b>*LTM</b></dt>
<dd>The volume used has no labels, but has a leading tape mark before the first data record.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CPYTOTAP.TORCDLEN"></a>
<h3>Record length (TORCDLEN)</h3>
<p>Specifies (in bytes) the length of the records that are written on the tape to-file. The records in the from-file may be truncated or padded with blanks to conform to the record length specified before they are written to the tape. If an existing data file (with standard labels) is being extended on tape, the record length is obtained from the second header label (HDR2). The record length, block length and record block format must be consistently specified. If a new data file is being added or if it is a nonlabeled file, the record length must be explicitly specified by this parameter or by the RCDLEN parameter in one of the tape device file commands.
</p>
<dl>
<dt><b><u>*FROMFILE</u></b></dt>
<dd>The record length for the to-file is the same as the record length of the from-file. If the from-file has a variable record length, the maximum record length of the from-file is used as the record length of the to-file.
</dd>
<dt><b>*TAPF</b></dt>
<dd>The record length defined in the tape file is used.
</dd>
<dt><b>*CALC</b></dt>
<dd>The record length from the existing data file label is used.
</dd>
<dt><b><i>record-length</i></b></dt>
<dd>Specify the record length ranging from 1 through 32767 bytes that is used for records that are written to the to-file. The record length must be consistent with the block length and the record block format values.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CPYTOTAP.TOENDOPT"></a>
<h3>End of tape option (TOENDOPT)</h3>
<p>Specifies the positioning operation that is done automatically on the last tape volume of the to-file when the tape device-file is closed. For a multivolume tape to-file, all intermediate reels are positioned by specifying the *UNLOAD value. This only applies to the last reel.
</p>
<dl>
<dt><b><u>*TAPF</u></b></dt>
<dd>The tape is repositioned according to the value specified in the tape file.
</dd>
</dl>
<dl>
<dt><b>*REWIND</b></dt>
<dd>The tape is rewound, but not unloaded.
</dd>
</dl>
<dl>
</dl>
<dl>
<dt><b>*UNLOAD</b></dt>
<dd>The tape is automatically rewound and unloaded after the operation ends.
</dd>
</dl>
<dl>
</dl>
<dl>
<dt><b>*LEAVE</b></dt>
<dd>The tape does not rewind or unload after the operation ends. It remains at the current position on the tape drive.
</dd>
</dl>
<dl>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CPYTOTAP.TOVOL"></a>
<h3>Volume identifier (TOVOL)</h3>
<p>Specifies, for tapes with standard labels, one or more volume identifiers of the tapes that are used when copying records to the tape to-file. The tape volumes must be placed in the device in the same order as the identifiers are specified. A message is sent to the operator if they are not.
</p>
<p>You can enter multiple values for this parameter. If you are on an entry display and you need additional entry fields to enter these multiple values, type a plus sign (+) in the entry field opposite the phrase "+ for more", and press the Enter key.
</p>
<dl>
<dt><b><u>*TAPF</u></b></dt>
<dd>The tape volume identifiers in the tape file are used.
</dd>
<dt><b>*NONE</b></dt>
<dd>No tape volume identifiers are specified for this file. No volume checking is done beyond verifying that a volume with the correct label type is on the device.
</dd>
<dt><b><i>volume-identifier</i></b></dt>
<dd>Specify up to 50 volume identifiers used to identify the tapes to receive the copied records. The tape volumes must be on the device in the same order as the identifiers are specified and in the same order as the device names are specified on the TODEV parameter. Each identifier can have up to 6 alphanumeric characters.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CPYTOTAP.TOBLKLEN"></a>
<h3>Block length (TOBLKLEN)</h3>
<p>Specifies (in bytes) the length of data blocks transferred to the tape. The block length must be consistent with the record length and record block format values.
</p>
<dl>
<dt><b><u>*TAPF</u></b></dt>
<dd>The block length value from the tape file is used.
</dd>
<dt><b>*CALC</b></dt>
<dd>No block length is specified for the tape to-file. The block length from the existing data file label is used.
</dd>
<dt><b><i>block-length</i></b></dt>
<dd>Specify the maximum length of the data block written to the tape. The minimum block size value is 18 bytes and the maximum size is 524288 bytes.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CPYTOTAP.TORCDBLK"></a>
<h3>Record block type (TORCDBLK)</h3>
<p>Specifies the record format and blocking attributes of records that are copied to the tape to-file. The record block format from an existing data file label is used if an existing data file is being extended as the to-file. The record length, block length, and record block format parameters must be consistently specified.
</p>
<dl>
<dt><b><u>*TAPF</u></b></dt>
<dd>The record block format value from the tape file is used.
</dd>
<dt><b>*F</b></dt>
<dd>Fixed-length, deblocked records in either EBCDIC or ASCII format are used.
</dd>
<dt><b>*FB</b></dt>
<dd>Fixed-length, blocked records in either EBCDIC or ASCII format are used.
</dd>
<dt><b>*V</b></dt>
<dd>Variable-length, deblocked records in EBCDIC format are used.
</dd>
<dt><b>*VB</b></dt>
<dd>Variable-length, blocked records in EBCDIC format are used.
</dd>
<dt><b>*D</b></dt>
<dd>Variable-length, deblocked records in ASCII type D format are used.
</dd>
<dt><b>*DB</b></dt>
<dd>Variable-length, blocked records in ASCII type D format are used.
</dd>
<dt><b>*VS</b></dt>
<dd>Variable, spanned records are used.
</dd>
<dt><b>*VBS</b></dt>
<dd>Variable, spanned blocked records are used.
</dd>
<dt><b>*U</b></dt>
<dd>Records in an undefined format are used.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CPYTOTAP.TOEXPDATE"></a>
<h3>File expiration date (TOEXPDATE)</h3>
<p>Specifies the expiration date for the data file that is being added to the to-file. The data file expiration date is established for standard label tape files only and is stored in the tape header label immediately preceding the data file that the label describes.
</p>
<dl>
<dt><b><u>*TAPF</u></b></dt>
<dd>The expiration date from the tape file is used for the to-file.
</dd>
<dt><b>*PERM</b></dt>
<dd>The data file being added is protected permanently.
</dd>
<dt><b><i>file-expiration-date</i></b></dt>
<dd>Specify the expiration date that is used for the data file. The date must be specified in the format defined by the system values QDATFMT and, if separators are used, QDATSEP.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CPYTOTAP.NBRRCDS"></a>
<h3>Number of records to copy (NBRRCDS)</h3>
<p>Specifies the number of records copied to the to-file.
</p>
<dl>
</dl>
<dl>
<dt><b><u>*END</u></b></dt>
<dd>Records are copied until the end-of-file condition is indicated.
</dd>
</dl>
<dl>
<dt><b><i>number-of-records</i></b></dt>
<dd>Specify a record number, ranging from 1 through 4294967288, that identifies the number of records copied to the to-file. Fewer records are copied if an end-of-file condition occurs before the specified number of records have been copied.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CPYTOTAP.COMPACT"></a>
<h3>Data compaction (COMPACT)</h3>
<p>Specifies whether device data compaction is performed. If the tape device used by the to-file does not support data compaction, this parameter is ignored.
</p>
<p>The possible values are:
</p>
<dl>
<dt><b><u>*TAPF</u></b></dt>
<dd>To-file device data compaction is performed only if the device used by the to-file supports data compaction.
</dd>
<dt><b>*NO</b></dt>
<dd>To-file device data compaction is not performed.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CPYTOTAP.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Copying the First Member in a Database File to Tape</b>
</p>
<p>
<pre>
CPYTOTAP FROMFILE(MYLIB/MYFILE) TOFILE(QTAPE) TODEV(QTAPE1)
TORCDLEN(*FROMFILE) TOEXPDATE(10 15 89)
</pre>
</p>
<p>This command copies the first member in database file MYFILE in library MYLIB to tape. The tape device file QTAPE is used which has attributes of SEQNBR(1) and RCDBLKFMT(*F), which are used as defaults for parameters TOSEQNBR and TORCDBLK. The additional attributes specified on the copy command include the tape device name and the expiration date of the file written on tape. The label name used on tape is the same name as that of the member copied. The record length of the tape file is also the same as the database from-file record length since TORCDLEN (*FROMFILE) was specified.
</p>
<p><b>Example 2: Copying a Member in a Database File to Tape</b>
</p>
<p>
<pre>
CPYTOTAP FROMFILE(MYLIB/MYFILE) TOFILE(QTAPE) FROMMBR(M1)
TOLABEL(BACKUPM1) TODEV(QTAPE1) TORCDLEN(50)
TOBLKLEN(1000) TORCKBLK(*FB) TOENDOPT(*LEAVE)
</pre>
</p>
<p>This command copies member M1 from database file MYFILE in library MYLIB to tape, using tape device file QTAPE. The records are copied to label BACKUPM1 on tape device QTAPE1 and the reel is left at its current position when the copy is completed. The data file written on tape has fixed-length 50-byte records that are blocked 1000 bytes (or 20 records) to a block.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CPYTOTAP.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPF2816</b></dt>
<dd>File &amp;1 in &amp;2 not copied because of error.
</dd>
<dt><b>CPF2817</b></dt>
<dd>Copy command ended because of error.
</dd>
<dt><b>CPF2859</b></dt>
<dd>Shared open data path not allowed.
</dd>
<dt><b>CPF2864</b></dt>
<dd>Not authorized to file &amp;1 in library &amp;2.
</dd>
<dt><b>CPF2875</b></dt>
<dd>Wrong file member or label opened.
</dd>
<dt><b>CPF2904</b></dt>
<dd>Diskette labels not valid for multiple label copy.
</dd>
<dt><b>CPF2949</b></dt>
<dd>Error closing member &amp;3 in file &amp;1 in &amp;2.
</dd>
<dt><b>CPF2952</b></dt>
<dd>Error opening file &amp;1 in library &amp;2.
</dd>
<dt><b>CPF2968</b></dt>
<dd>Position error occurred copying file &amp;1 in &amp;2.
</dd>
<dt><b>CPF2971</b></dt>
<dd>Error reading member &amp;3 in file &amp;1.
</dd>
<dt><b>CPF2972</b></dt>
<dd>Error writing to member &amp;3 in file &amp;1.
</dd>
<dt><b>CPF9212</b></dt>
<dd>Cannot load or unload DDM file &amp;2 in &amp;3.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CPYTOTAP.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>