ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzam4_5.4.0.1/rzam4udfproginterfces.htm

113 lines
7.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="concept" />
<meta name="DC.Title" content="Programming interfaces UDF" />
<meta name="abstract" content="You can create files or read files on UDF media by using either the Hierarchical File System (HFS) application programming interface (API) or the integrated file system programming interface. There are things specific to the i5/OS implementation of the UDF media format that application developers need to know." />
<meta name="description" content="You can create files or read files on UDF media by using either the Hierarchical File System (HFS) application programming interface (API) or the integrated file system programming interface. There are things specific to the i5/OS implementation of the UDF media format that application developers need to know." />
<meta name="DC.Relation" scheme="URI" content="rzam4universaldiskformat.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="rzam4udfproginterfces" />
<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>Programming interfaces UDF</title>
</head>
<body id="rzam4udfproginterfces"><a name="rzam4udfproginterfces"><!-- --></a>
<img src="./delta.gif" alt="Start of change" /><!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Programming interfaces UDF</h1>
<div><p>You can create files or read files on UDF media by using either
the Hierarchical File System (HFS) application programming interface (API)
or the integrated file system programming interface. There are things specific
to the i5/OS™ implementation
of the UDF media format that application developers need to know.</p>
<dl><dt class="dlterm">National Language Support</dt>
<dd>The integrated file system interfaces assume that the CCSID (coded character
set identifier) represents the path in effect for the job. The system then
converts the path from the job CCSID to an internally used CCSID. The HFS
API interface makes no assumption about the CCSID of the path; therefore,
the system performs no character set conversion on the path. This could produce
undesirable side effects if an application used the two API sets interchangably
or if the application changed from using one API set to the other.</dd>
<dd class="ddexpand">You should not create files through HFS and then try to read them by using
the integrated file system APIs. Depending on the characters that are used
in the path name, a File not found error could result. This type of problem
can be avoided if the application uses only invariant characters (for example,
A-Z 0-9 + = % &amp; ( ) , _ . : ;) for path names. Invariant characters are
graphic characters that map to the same code point in all character sets. </dd>
<dd class="ddexpand">Since UDF is an industry-standard media format, NLS compliance could be
important because of the increased opportunity for media interchange across
different operating system platforms. This causes the system to limit HFS
interfaces to UDF media. Additionally, the system uses invariant characters
to reduce the chance of media interchange problems that are related to file
names. Assume that an HFS-based application absolutely requires the use of
variant characters. You can use the Change Optical Attributes (CHGOPTA) CL
command to allow variant characters through the HFS interface by specifying
CHGOPTA ALWVRNT(*YES). After the system allows variant characters through
HFS, there is no guarantee that path names will interchange correctly if accessed
from another operating system. There is also no guarantee that path names
will be consistent between the HFS and integrated file system interfaces.</dd>
</dl>
<dl><dt class="dlterm">Held optical files</dt>
<dd>The system does not create held files for UDF media. When a file fails
to close on UDF, the system signals an error to the application. This error
then closes the file without writing the data to optical disk. The application
must rewrite the file (open, write, close) to ensure that the data is on optical
disk. The exception to this is if the application did a <span class="apiname">Force Buffered
Data</span> or <span class="apiname">fsync()</span> API (QHFFRCSF) prior to the close
operation. </dd>
<dd class="ddexpand">These APIs will force the writing of the data to the optical disk.</dd>
</dl>
<dl><dt class="dlterm">File sharing</dt>
<dd>Multiple jobs or threads can share files for read, but writers are always
exclusive. If one job or thread is writing to a file on UDF, you cannot use
any other jobs or threads to open that file. </dd>
<dd class="ddexpand">Therefore, when using integrated file system open() or open64() APIs,
the sharing modes O_SHARE_RDONLY, O_SHARE_WRONLY, and O_SHARE_RDWR do not
provide the requested level of sharing when the access mode is O_RDWR or O_WRONLY.
When the access method is O_RDWR or O_WRONLY, the resulting sharing mode will
be equivalent to O_SHARE_NONE.</dd>
<dd class="ddexpand">When using the HFS Open Stream File API, the lock modes deny none, deny
write, and deny read do not provide the requested level of sharing when the
access mode is write only or read/write. When the access method is write only
or read/write, the resulting lock mode will be deny read/write.</dd>
</dl>
<dl><dt class="dlterm">Mixed-case file name</dt>
<dd>When created through the integrated file system interfaces, files and
directories created on UDF volumes will preserve the case specified on the
create. For example, if file Abc is specified on the <span class="apiname">open()</span> API,
Abc will be created on the media in the mixed-case form. Even though the system
preserves file case, file searches are case-insensitive meaning that the system
can read the file that uses any case such as ABC or abc.</dd>
<dd class="ddexpand">When created through the HFS or save and restore interfaces, the system
stores files and directories that are created on the UDF volumes in uppercase.
For example, if you specify file Abc on the Open Stream File API, the system
creates ABC on the media. Again, file searches are case-insensitive so you
can specify any case to read the file.</dd>
<dd class="ddexpand">File searches on UDF volumes created by i5/OS are case-insensitive. For UDF media
created or updated by another operating system platform, a case sensitive
search is performed. If no case-sensitive match is found, a case-insensitve
match is returned if it exists. If multiple case-insensitive matches exist
on the UDF volume, an error is returned indicating that ambiguous names exist
on the media.</dd>
</dl>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzam4universaldiskformat.htm" title="UDF (Universal Disk Format) is the OSTA (Optical Storage Technology Association) supported subset of ISO/IEC 13346.">Universal disk format</a></div>
</div>
</div>
<img src="./deltaend.gif" alt="End of change" /></body>
</html>