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

158 lines
10 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="Change the library list" />
<meta name="abstract" content="You can change the library list in a variety of ways." />
<meta name="description" content="You can change the library list in a variety of ways." />
<meta name="DC.subject" content="ADDLIBLE (Add Library List Entry) command, Add Library List Entry (ADDLIBLE) command, command, CL, ADDLIBLE (Add Library List Entry), Add Library List Entry (ADDLIBLE), library list, entry, adding, library list entry, CHGLIBL (Change Library List) command, Change Library List (CHGLIBL) command, command, CL, CHGLIBL (Change Library List), Change Library List (CHGLIBL), library list, changing, RMVLIBLE (Remove Library List Entry) command, Remove Library List Entry (RMVLIBLE) command, RMVLIBLE (Remove Library List Entry), Remove Library List Entry (RMVLIBLE), removing, example, initial program, replacing library list, saving library list, saving, authority, library, QCMDEXC program, process command string" />
<meta name="keywords" content="ADDLIBLE (Add Library List Entry) command, Add Library List Entry (ADDLIBLE) command, command, CL, ADDLIBLE (Add Library List Entry), Add Library List Entry (ADDLIBLE), library list, entry, adding, library list entry, CHGLIBL (Change Library List) command, Change Library List (CHGLIBL) command, command, CL, CHGLIBL (Change Library List), Change Library List (CHGLIBL), library list, changing, RMVLIBLE (Remove Library List Entry) command, Remove Library List Entry (RMVLIBLE) command, RMVLIBLE (Remove Library List Entry), Remove Library List Entry (RMVLIBLE), removing, example, initial program, replacing library list, saving library list, saving, authority, library, QCMDEXC program, process command string" />
<meta name="DC.Relation" scheme="URI" content="ulibl.htm" />
<meta name="DC.Relation" scheme="URI" content="../rzaks/rzaksjobdescription.htm" />
<meta name="DC.Relation" scheme="URI" content="../clfinder/finder.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/chgcurlib.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/sbmjob.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/addlible.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/rmvlible.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="chglibl" />
<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>Change the library list</title>
</head>
<body id="chglibl"><a name="chglibl"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Change the library list</h1>
<div><p>You can change the library list in a variety of ways.</p>
<div class="section"> <p>For a running job, you can add entries to or remove entries from
the library list by using the <span class="cmdname">Add Library List Entry (ADDLIBLE)</span> command
or the <span class="cmdname">Remove Library List Entry (RMVLIBLE)</span> command, or
you can change the libraries in the library list by using the CHGLIBL command
or the EDTLIBL command. These commands change the user part of the library
list, not the system part.</p>
<p>The current library may be added or changed
using the <span class="cmdname">Change Current Library (CHGCURLIB)</span> or CHGLIBL
command. The current library can also be changed in the user's user profile,
at sign-on, or on the <span class="cmdname">Submit Job (SBMJOB)</span> command. The
product libraries cannot be added using a CL command; these libraries are
added by the system when a command or menu using them is run. The product
libraries cannot be changed with a CL command; however, they can be changed
with the <span class="apiname">Change Library List (QLICHGLL)</span> API.</p>
<p>When
you use these commands, the change to the library list affects only the job
in which the command is run, and the change is effective only as long as the
job is running, or until you change the job's library list again. When the
library list is changed through the use of these commands, the libraries must
exist when the command is run. A library cannot be deleted if it exists in
your job's library list. If it exists in another job's library list, it cannot
be deleted only if the system value QLIBLCKLVL is set to lock libraries in
the library search list.</p>
<p>When a job is started, the user portion of
the library list is determined by the values contained in the job description
or by values specified on the <span class="cmdname">Submit Job (SBMJOB)</span> command.
A value of *SYSVAL can be specified, which causes the libraries specified
by the system value QUSRLIBL to become the user portion of the library list.
If you have specified library names in both the job description and the <span class="cmdname">Batch
Job (BCHJOB)</span> or <span class="cmdname">Submit Job (SBMJOB)</span> command,
the library names specified in the BCHJOB or SBMJOB command override both
the libraries specified in the job description and the system value QUSRLIBL.</p>
<p>The
following shows the order in which the user part of the library list specified
in QUSRLIBL is overridden by commands for individual jobs: </p>
<ul><li>A library list can be specified in the job description that, when the
job is run, overrides the library list specified in QUSRLIBL.</li>
<li>When a job is submitted either through a <span class="cmdname">Batch Job (BCHJOB)</span> command
or a <span class="cmdname">Submit Job (SBMJOB)</span> command, a library list can be
specified on the command. This list overrides the library list specified
in the job description or in the system value QUSRLIBL.</li>
<li>When a job is submitted using the <span class="cmdname">Submit Job (SBMJOB)</span> command,
*CURRENT (the default) can be specified for the library list. *CURRENT indicates
that the library list of the job issuing the <span class="cmdname">Submit Job (SBMJOB)</span> command
is used.</li>
<li>Within a job, an ADDLIBLE, RMVLIBLE, or CHGLIBL command can be used. These
commands override any previous library list specifications.</li>
<li>The current library for the job can be changed using the CHGCURLIB or
CHGLIBL command.</li>
</ul>
<p>Instead of entering the CHGLIBL command each time you want to change
the library list, you can place the command in a CL program: </p>
<pre>PGM /* SETLIBL - Set library list */
CHGLIBL LIBL(APPDEVLIB QGPL QTEMP)
ENDPGM</pre>
<p>If you normally work with this library list, you could set
up an initial program to establish the library list instead of calling the
program each time: </p>
<pre>PGM /* Initial program for QPGMR */
CHGLIBL LIBL(APPDEVLIB QGPL QTEMP)
TFRCTL PGM(QPGMMENU)
ENDPGM</pre>
<p>This program must be created and the user profile to which
it will apply changed to specify the new initial program. Control then transfers
from this program to the QPGMMENU program, which displays the Programmer Menu.</p>
<p>If
you occasionally need to add a library to the library list specified in your
initial program, you can use the ADDLIBLE command to add that library to the
library list. For example, the following command adds the library JONES to
the end of the library list: </p>
<pre>ADDLIBLE LIB(JONES) POSITION(*LAST)</pre>
<p>If part of your job requires a different library list, you
can write a CL program that saves the current library list and later restores
it, such as the following program. </p>
<pre> PGM
DCL &amp;LIBL *CHAR 2750
DCL &amp;CMD *CHAR 2760
(1) RTVJOBA USRLIBL(&amp;LIBL)
(2) CHGLIBL (QGPL QTEMP)
.
.
.
(3) CHGVAR &amp;CMD ('CHGLIBL (' *CAT &amp;LIBL *TCAT ')')
(4) CALL QCMDEXC (&amp;CMD 2760)
.
.
.
ENDPGM</pre>
<dl><dt class="dlterm"><samp class="codeph">(1)</samp></dt>
<dd>Command to save the library list. The library list is stored into variable &amp;LIBL.
Each library name occupies 10 bytes (padded on the right with blanks if necessary),
and one blank is between each library name.</dd>
<dt class="dlterm"><samp class="codeph">(2)</samp></dt>
<dd>This command changes the library list as required by the following function.</dd>
<dt class="dlterm"><samp class="codeph">(3)</samp></dt>
<dd>The <span class="cmdname">Change Variable (CHGVAR)</span> command builds a CHGLIBL
command in variable &amp;CMD. </dd>
<dt class="dlterm"><samp class="codeph">(4)</samp></dt>
<dd>QCMDEXC is called to process the command string in variable &amp;CMD.
The CHGVAR command is required before the call to QCMDEXC because concatenation
cannot be done on the CALL command.</dd>
</dl>
</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="../rzaks/rzaksjobdescription.htm">Job description in Work Management</a></div>
<div><a href="../clfinder/finder.htm">CL command finder</a></div>
<div><a href="../cl/chgcurlib.htm">Change Current Library (CHGCURLIB) command</a></div>
<div><a href="../cl/sbmjob.htm">Submit Job (SBMJOB) command</a></div>
<div><a href="../cl/addlible.htm">Add Library List Entry (ADDLIBLE) command</a></div>
<div><a href="../cl/rmvlible.htm">Remove Library List Entry (RMVLIBLE) command</a></div>
</div>
</div>
</body>
</html>