ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzau8_5.4.0.1/capacitymanage.htm

83 lines
4.9 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="task" />
<meta name="DC.Title" content="Managing media capacity on a per-file basis" />
<meta name="abstract" content="Learn how to manage media capacity on a per-file basis." />
<meta name="description" content="Learn how to manage media capacity on a per-file basis." />
<meta name="DC.Relation" scheme="URI" content="tipsandtechniques.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2000, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2000, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="capacitymanage" />
<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>Managing media capacity on a per-file basis</title>
</head>
<body id="capacitymanage"><a name="capacitymanage"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Managing media capacity on a per-file basis</h1>
<div><p>Learn how to manage media capacity on a per-file basis.</p>
<div class="p"><div class="p">An application might need to manage the media capacity on a per-file
basis. Following are a few methods you can use to decide if a file will fit
on the media: <ol><li>Handle error on a close operation <p>Assume an optical volume is initialized
to a 95% threshold and an application writes files until the volume threshold
is reached. When the threshold is reached, the application will receive message
CPF1F61, <kbd class="userinput">No free space available on media</kbd>. At this
point, the volume threshold can be increased to 97% (or anything else up to
100%) by using the CHGOPTVOL command. You can then attempt to close the file.</p>
</li>
<li>Specify QALCSIZE on the Open Stream File HFS API <div class="p">Another method to
determine if a file will fit on a volume is by specifying an allocation size
(QALCSIZE) on an open stream file. On an open stream file, the system can
pass a value in attribute QALCSIZE. This attribute is valid when the open
operation is for create or replace; otherwise, it is ignored. Specifying a
value for QALCSIZE results in comparing the specified value against the space
available on the volume. If the space available is less than QALCSIZE, then
the system issues message CPF1F61. The space available must exceed the QALCSIZE
in order for the open operation to occur. Only on the first open instance
of a file honors this attribute. If specified by more than one opening of
a file, the system ignores the additional attributes. <div class="note"><span class="notetitle">Note:</span> This does not
actually allocate space on the optical volume at the time of the open operation.
It checks the volume to see if the number of requested bytes
are available.</div>
</div>
<div class="p">There are drawbacks to using this method: <ol type="a"><li>You need to know the size of the file you are creating at the time you
make the open request.</li>
<li>If multiple jobs are writing to the same media, there is no guarantee
that by the time the data is written, the space will still be available.</li>
</ol>
</div>
<p>If the size of the file is known prior to the time the open request
is made, and there will not be other jobs writing to that volume during the
time your file is open, this is an excellent method to check media capacity
before creating a file.</p>
</li>
<li>Retrieve space available on a volume <p>Another method is to have the
application retrieve the space available on the volume. You can do this by
using the Display Optical (DSPOPT) command through output file support. The
output file can then be read to retrieve the number of bytes assumed to be
available on the media.</p>
</li>
</ol>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="tipsandtechniques.htm" title="The following techniques are often helpful in designing custom optical programs for your business.">Tips: Optical programming</a></div>
</div>
</div>
</body>
</html>