ibm-information-center/dist/eclipse/plugins/i5OS.ic.rbam6_5.4.0.1/objuseliblist.htm

91 lines
6.7 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="Use a library list" />
<meta name="abstract" content="Using a library list simplifies finding objects on the system." />
<meta name="description" content="Using a library list simplifies finding objects on the system." />
<meta name="DC.subject" content="library list, accessing object, search order" />
<meta name="keywords" content="library list, accessing object, search order" />
<meta name="DC.Relation" scheme="URI" content="ulibl.htm" />
<meta name="DC.Relation" scheme="URI" content="../rzalz/rzalzosintro.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="objuseliblist" />
<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>Use a library list</title>
</head>
<body id="objuseliblist"><a name="objuseliblist"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Use a library list</h1>
<div><p>Using a library list simplifies finding objects on the system.</p>
<div class="section"><p>Each job has a library list associated with it. When a library
list is used to find an object, each library in the list is searched in the
order of its occurrence in the list until an object of the specified name
and type is found. If two or more objects of the same type and name exist
in the list, you get the object from the library that appears first in the
library list. The following diagram shows the searches made for an object
both when the library list (*LIBL) is used and when a library name is specified:</p>
<div class="note"><span class="notetitle">Note:</span> Alternatively,
use *NLVLIBL instead of *LIBL to qualify any command. Enter the command from
a CL program, on a command line, or anywhere you normally enter a command.
The system uses *NLVLIBL to determine which libraries to search for the *CMD
object. You search only the national language support libraries in the library
list by specifying *NLVLIBL. </div>
<br /><img src="rbafn525.gif" alt="This diagram shows the searches made for an object both when the library list (*LIBL) is used and when a library name is specified." /><br /><div class="p">The following diagram shows
what happens when two objects of the same name but different types are in
the library list. The system will search for CUSTINQ *FILE in the library
list by specifying: <pre>DSPOBJD OBJ(*LIBL/CUSTINQ) OBJTYPE(*FILE)</pre>
</div>
<br /><img src="rbafn541.gif" alt="This diagram shows what happens when two objects of the same name but different types are in the library list." /><br /><p>Generally, a library list
is more flexible and easier to use than qualified names. More important than
the advantage of not entering the library name, is the advantage of performing
functions in an application on different data simply by using a different
library list without having to change the application. For example, a CL program
PGMA updates a data area CHKNBR. If the library name is not specified, the
program can update the data area named CHKNBR in different libraries depending
on the use of the library list. For example, assume that JOBA and JOBB both
call PGMA as shown in the following illustration:</p>
<br /><img src="rbafn526.gif" alt="In this illustration assume that JOBA and JOBB both call PGMA. Generally, a library list is more flexible and easier to use than qualified names. More important than the advantage of not entering the library name, is the advantage of performing functions in an application on different data simply by using a different library list without having to change the application. For example, a CL program PGMA updates a data area CHKNBR. If the library name is not specified, the program can update the data area named CHKNBR in different libraries depending on the use of the library list." /><br /><p>However, the use of a qualified
name is advantageous in any of the following situations: </p>
<ul><li>When the object you are using is not in the library list for the job</li>
<li>When there is more than one object of the same name in the library list
and you want one in a specific library</li>
<li>When you want to ensure that a specific library is used for security reasons.</li>
</ul>
<p>If, however, you call a program using a qualified name and the program
attempts to open files whose names are not qualified, the files are not opened
if they are not in the library list, as shown in the following example:</p>
<br /><img src="rbafn527.gif" alt="This example shows you can call a program using a qualified name and the program attempts to open files whose names are not qualified, the files are not opened if they are not in the library list." /><br /><p>The call to PGMA is successful
because the program name is qualified on the CALL command. However, when the
program attempts to open file ORDENTP, the open operation fails because the
file is not in one of the libraries in the library list, and its name is not
qualified. If library DISTLIB2 was added to the library list or a qualified
file name was used, the program could open the file. Some high-level languages
do not allow a qualified file name to be specified. By using an Override (OVRxxx)
command, a qualified name can be specified.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="ulibl.htm" title="Library lists are used by the system to locate objects.">Library lists</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../rzalz/rzalzosintro.htm">Object signing and signature verification</a></div>
</div>
</div>
</body>
</html>