197 lines
12 KiB
HTML
197 lines
12 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="concept" />
|
||
|
<meta name="DC.Title" content="Open processing for tape device files" />
|
||
|
<meta name="abstract" content="Use this information to find out the considerations for opening tape device files." />
|
||
|
<meta name="description" content="Use this information to find out the considerations for opening tape device files." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="usetfhll.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../apis/qtardcap.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2004, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2004, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="opcsd" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Open processing for tape device files</title>
|
||
|
</head>
|
||
|
<body id="opcsd"><a name="opcsd"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Open processing for tape device files</h1>
|
||
|
<div><p>Use this information to find out the considerations for opening
|
||
|
tape device files.</p>
|
||
|
<p>The following considerations apply to opening tape device files: </p>
|
||
|
<ul><li>When the program opens a tape device file, the system merges any parameters
|
||
|
that are specified in the file with the parameters that are specified in the
|
||
|
program. The system then merges these parameters with the parameters that
|
||
|
are specified on an OVRTAPF command.</li>
|
||
|
<li>Specify the device names when you open the tape device file. If you specify
|
||
|
DEV(*NONE) in the tape file, you must specify one or more device names on
|
||
|
an OVRTAPF command. You can specify as many as four device names for a single
|
||
|
tape device file (depending on how many magnetic tape devices you have). <p>The
|
||
|
record length, block length, record-block-format, and buffer offset (for an
|
||
|
ASCII file) always return to the program in the data management open feedback
|
||
|
area. They return in the format in which they are written in the HDR2 file
|
||
|
header label. This information is available regardless of the type of label
|
||
|
processing that is used for the file.</p>
|
||
|
</li>
|
||
|
<li>The following data files support the read-backward operation for both
|
||
|
single volume tape data files and multivolume-tape data files: <ul><li>fixed (*F)</li>
|
||
|
<li>fixed block (*FB)</li>
|
||
|
<li>undefined format (*U)</li>
|
||
|
</ul>
|
||
|
You request a read backward operation through a high-level language when
|
||
|
you open the file. An escape message is signaled if a read-backward operation
|
||
|
is attempted for variable-length (spanned or not spanned) or source records.
|
||
|
<div class="note"><span class="notetitle">Note:</span> Use the Retrieve Device Capabilities (QTARDCAP) API to determine the
|
||
|
device capabilities of your device. The following tape devices do not have
|
||
|
read-backward capabilities: <ul><li>9348 tape unit</li>
|
||
|
<li>8-mm cartridge device</li>
|
||
|
<li>Some 1/4-inch cartridge devices</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<p>Reading
|
||
|
a data file backwards, where you specify the device and volume list, you must position the volumes
|
||
|
on the device in reverse order. For example, a device file with DEV(QTAPE1
|
||
|
QTAPE2) VOL(VOL01 VOL02 VOL03) expects VOL03 on QTAPE1, VOL02 on QTAPE2, and
|
||
|
then VOL01 on QTAPE1.</p>
|
||
|
<div class="p">For a read-backward operation, the end-of-file
|
||
|
condition occurs if the system recognizes the first volume of the data file
|
||
|
from the header labels for the following label processing parameter values: <ul><li>Standard label processing (*SL)</li>
|
||
|
<li>Bypass label processing (*BLP)</li>
|
||
|
</ul>
|
||
|
If the system does not recognize the header labels for the first volume
|
||
|
of the data file, or if this is a *BLP file, the system signals the end-of-file
|
||
|
condition when: <ul><li>The system processes the specified number of reels.</li>
|
||
|
<li>The system processes the number of identifiers on the VOL parameter.</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</li>
|
||
|
<li>Some high-level languages allow you to specify where to position the tape when the program opens an input tape device
|
||
|
file. This indicates whether you process the tape in the forward or in the
|
||
|
backward direction. These rules determine the first volume of a data file: <ul><li>HDR1 labels multivolume sequence field = 1 (ASCII or EBCDIC with no HDR2
|
||
|
label) <p>or</p>
|
||
|
</li>
|
||
|
<li>HDR2 label volume switch indicator field = 0 (EBCDIC)</li>
|
||
|
</ul>
|
||
|
<p>The program specifies the record length according to the information that is shown in <a href="#opcsd__rft">Table 1</a>.</p>
|
||
|
</li>
|
||
|
<li>For source files, the record length used to determine the block length
|
||
|
is the actual data length, not the data length plus 12 bytes (for sequence
|
||
|
number and date).</li>
|
||
|
<li>You must supply either a RCDLEN or BLKLEN parameter value
|
||
|
for unspanned, deblock records (*F, *V, *D, *U).</li>
|
||
|
<li>You must supply both RCDLEN and BLKLEN parameter values for spanned or
|
||
|
blocked records (*FB, *VB, *DB, *VS, *VBS).</li>
|
||
|
<li>When the file type specified in the tape device file is a source file: <ul><li>The system appends a date and sequence number to each record on input
|
||
|
operations. The date field is always 0.</li>
|
||
|
<li>The system removes the date and sequence number from each record on output
|
||
|
operations</li>
|
||
|
</ul>
|
||
|
The
|
||
|
program can check (if the high-level language you are using allows it) to
|
||
|
determine if the input or output file is a source file. The record length
|
||
|
must include 12 bytes for the date and sequence number. The block length and
|
||
|
record length ratio remains the same for a source block and data record minus
|
||
|
the 12 bytes allocated to source files. For example, if the actual data record
|
||
|
length is 80, the record length becomes 92 for a source file. The block length
|
||
|
remains unchanged.</li>
|
||
|
<li>To process input files using standard labels the system will always use
|
||
|
the block length in the file label. The device file block length is ignored. </li>
|
||
|
<li>Variable-length (spanned or unspanned) records
|
||
|
and undefined format records can be used for output files. If your high-level
|
||
|
language does not support variable-length records, then all records for an
|
||
|
output tape device file that uses variable format are maximum length.</li>
|
||
|
<li>Specify the sequence number so you can find the data
|
||
|
file. You cannot locate tape data files by label name.</li>
|
||
|
<li>When you specify both the VOL and REELS parameters, the REELS parameter
|
||
|
is ignored. If
|
||
|
you want to use the REELS parameter (number of reels) to limit the number
|
||
|
of input volumes that is processed, specify *NONE for the VOL parameter.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="tablenoborder"><a name="opcsd__rft"><!-- --></a><table cellpadding="4" cellspacing="0" summary="" id="opcsd__rft" width="100%" frame="hsides" border="0" rules="none"><caption>Table 1. Specify record lengths
|
||
|
by record and format type</caption><thead align="left"><tr><th align="left" valign="bottom" width="16.636528028933093%" id="d0e258">Record and format type</th>
|
||
|
<th align="left" valign="bottom" width="16.636528028933093%" id="d0e260">Minimum record length for *DATA</th>
|
||
|
<th align="left" valign="bottom" width="16.636528028933093%" id="d0e262">Minimum record length for *SRC</th>
|
||
|
<th align="left" valign="bottom" width="16.636528028933093%" id="d0e264">Maximum record length for *DATA</th>
|
||
|
<th align="left" valign="bottom" width="16.636528028933093%" id="d0e266">Maximum record length for *SRC</th>
|
||
|
<th align="left" valign="bottom" width="16.817359855334537%" id="d0e268">Block length</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody><tr><td align="left" valign="top" width="16.636528028933093%" headers="d0e258 ">Fixed blocked, *F, *FB, *U</td>
|
||
|
<td align="center" valign="top" width="16.636528028933093%" headers="d0e260 ">18</td>
|
||
|
<td align="center" valign="top" width="16.636528028933093%" headers="d0e262 ">30</td>
|
||
|
<td align="left" valign="top" width="16.636528028933093%" headers="d0e264 ">32 767</td>
|
||
|
<td align="left" valign="top" width="16.636528028933093%" headers="d0e266 ">32 767</td>
|
||
|
<td align="left" valign="top" width="16.817359855334537%" headers="d0e268 ">Multiple of *DATA record length</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="16.636528028933093%" headers="d0e258 ">Variable unblocked, *V</td>
|
||
|
<td align="center" valign="top" width="16.636528028933093%" headers="d0e260 ">1</td>
|
||
|
<td align="center" valign="top" width="16.636528028933093%" headers="d0e262 ">13</td>
|
||
|
<td align="left" valign="top" width="16.636528028933093%" headers="d0e264 ">32 759 (See Note)</td>
|
||
|
<td align="left" valign="top" width="16.636528028933093%" headers="d0e266 ">32 767</td>
|
||
|
<td align="left" valign="top" width="16.817359855334537%" headers="d0e268 ">Equal to maximum *DATA record length plus
|
||
|
8</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="16.636528028933093%" headers="d0e258 ">D-type ASCII unblocked, *D</td>
|
||
|
<td align="center" valign="top" width="16.636528028933093%" headers="d0e260 ">1</td>
|
||
|
<td align="center" valign="top" width="16.636528028933093%" headers="d0e262 ">13</td>
|
||
|
<td align="left" valign="top" width="16.636528028933093%" headers="d0e264 ">9 995 (See Note)</td>
|
||
|
<td align="left" valign="top" width="16.636528028933093%" headers="d0e266 ">10 007 (See Note)</td>
|
||
|
<td align="left" valign="top" width="16.817359855334537%" headers="d0e268 ">Equal to maximum *DATA record length plus
|
||
|
4, plus buffer offset</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="16.636528028933093%" headers="d0e258 ">Variable blocked, *VB</td>
|
||
|
<td align="center" valign="top" width="16.636528028933093%" headers="d0e260 ">1</td>
|
||
|
<td align="center" valign="top" width="16.636528028933093%" headers="d0e262 ">13</td>
|
||
|
<td align="left" valign="top" width="16.636528028933093%" headers="d0e264 ">32 759</td>
|
||
|
<td align="left" valign="top" width="16.636528028933093%" headers="d0e266 ">32 767</td>
|
||
|
<td align="left" valign="top" width="16.817359855334537%" headers="d0e268 ">At least maximum *DATA record length plus
|
||
|
8</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="16.636528028933093%" headers="d0e258 ">D-type ASCII blocked, *DB</td>
|
||
|
<td align="center" valign="top" width="16.636528028933093%" headers="d0e260 ">1</td>
|
||
|
<td align="center" valign="top" width="16.636528028933093%" headers="d0e262 ">13</td>
|
||
|
<td align="left" valign="top" width="16.636528028933093%" headers="d0e264 ">9 995 (See Note)</td>
|
||
|
<td align="left" valign="top" width="16.636528028933093%" headers="d0e266 ">10 007 (See Note)</td>
|
||
|
<td align="left" valign="top" width="16.817359855334537%" headers="d0e268 ">At least maximum *DATA record length plus
|
||
|
4, plus buffer offset</td>
|
||
|
</tr>
|
||
|
<tr><td align="left" valign="top" width="16.636528028933093%" headers="d0e258 ">*VS, *VBS</td>
|
||
|
<td align="center" valign="top" width="16.636528028933093%" headers="d0e260 ">1</td>
|
||
|
<td align="center" valign="top" width="16.636528028933093%" headers="d0e262 ">13</td>
|
||
|
<td align="left" valign="top" width="16.636528028933093%" headers="d0e264 ">32 759</td>
|
||
|
<td align="left" valign="top" width="16.636528028933093%" headers="d0e266 ">32 759</td>
|
||
|
<td align="left" valign="top" width="16.817359855334537%" headers="d0e268 "> </td>
|
||
|
</tr>
|
||
|
<tr><td colspan="6" align="left" valign="top" headers="d0e258 d0e260 d0e262 d0e264 d0e266 d0e268 "> <div class="note"><span class="notetitle">Note:</span> This
|
||
|
is the maximum record length for a record being written to a tape. Input
|
||
|
records can be padded to 32 767.</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="usetfhll.htm" title="Understand the different processing types for tape device files used in high-level language.">Use tape device files in high-level language programs</a></div>
|
||
|
</div>
|
||
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
||
|
<div><a href="../apis/qtardcap.htm">Retrieve Device Capabilities (QTARDCAP) API</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|