76 lines
4.9 KiB
HTML
76 lines
4.9 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
|
<title>How HFS Support Processes a File System Job</title>
|
|
<!-- 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. -->
|
|
<!-- Change History: -->
|
|
<!-- YYMMDD USERID Change description -->
|
|
<!--File Edited November 2001 -->
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body><!--End Header Records -->
|
|
<!--Java sync-link-->
|
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
|
|
<h2>How HFS Support Processes a File System Job</h2>
|
|
|
|
<p>i5/OS<SUP>(TM)</SUP> HFS support and your file system work together to perform the function that an application requests when it calls an HFS API. <strong>HFS support</strong> is the part of the system that manages the HFS APIs as a group and passes information between the HFS APIs and the file system.</p>
|
|
|
|
<br>
|
|
<h3><a name="Header_106">First Call to File System</a></h3>
|
|
|
|
<p>The first time an application or job specifies a particular file system in a call to an HFS API, HFS support does the following:</p>
|
|
|
|
<ol>
|
|
<li>Checks the job's authority to the file system by checking its authority to the Start Job Session exit program. The job must have at least *USE authority to the Start Job Session exit program.<br><br></li>
|
|
|
|
<li>Obtains a shared read (*SHRRD) lock on the Start Job Session exit program. This prevents other jobs from deregistering the file system while the current job is using it. This lock remains in effect until the current job ends.<br><br></li>
|
|
|
|
<li>Calls the Start Job Session exit program, supplying the file system's name on the call in case the file system has been renamed during installation.
|
|
|
|
<p>The Start Job Session exit program performs any setup that the file system requires and returns a job handle to HFS support. The job handle is an arbitrary identifier that HFS support passes to the file system to help the file system keep track of this job. If the job calls another HFS API for this file system, HFS support passes this job handle as a parameter. The handle is treated as if it were a pointer, but it does not have to contain pointer data.</p></li>
|
|
|
|
<li>Calls the file system to complete the job's request by performing the work for the API.</li>
|
|
</ol>
|
|
|
|
<br>
|
|
<h3><a name="Header_107">Subsequent Calls to File System</a></h3>
|
|
|
|
<p>On subsequent calls to the file system, HFS support retrieves the job handle for that file system and calls the file system exit program for the appropriate API. The file system can use the Start Job Session exit program only at the start of a job.</p>
|
|
|
|
<br>
|
|
<h3><a name="Header_108">End of Job</a></h3>
|
|
|
|
<p>When i5/OS work management notifies HFS support that the job has ended, HFS support checks to see if the job has left any files or directories open. If it has, HFS support calls the file system to close them. HFS support then calls the End Job Session exit program to clean up any work areas used by the job. Your file system can use the End Job Session exit program to destroy temporary spaces and remove outstanding locks that were created during the job.</p>
|
|
|
|
<p>After the End Job Session exit program is run, HFS support unlocks the Start Job Session exit program, which was locked when the job first called the file system through an HFS API. The file system is no longer in use and can be deregistered.</p>
|
|
|
|
<br>
|
|
<h3><a name="HDRHFSJSC">Scenario: File System Job</a></h3>
|
|
|
|
<p>When the Start Job Session exit program is called, the file system could create a user space in the job's QTEMP library and return a space pointer to that user space as the job handle. On subsequent calls to HFS APIs for that file system, HFS support would pass that space pointer to the file system as the job handle. When the job ends, the file system's End Job Session exit program is called. The file system could use that exit program to delete the user space.</p>
|
|
|
|
<br>
|
|
<h3><a name="HDRHFSXSE">File System--Error Messages</a></h3>
|
|
|
|
<p>The exceptions that file systems are allowed to use are listed after each of the HFS exit programs. When a file system returns an allowed exception after a call from an HFS API, HFS support either sends the exception to the application or fills in the error code.</p>
|
|
|
|
<hr>
|
|
<center>
|
|
<table cellpadding="2" cellspacing="2">
|
|
<tr align="center"><td valign="middle" align="center">
|
|
<a href="#Top_Of_Page">Top</a>
|
|
| <a href="hfs1.htm">Hierarchical File System APIs</a>
|
|
| <a href="aplist.htm">APIs by category</a>
|
|
</td></tr>
|
|
</table>
|
|
</center>
|
|
<br>
|
|
</body></html>
|
|
|