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

101 lines
5.0 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?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="Examples: Change command defaults" />
<meta name="abstract" content="These provide examples of changing default values for commands." />
<meta name="description" content="These provide examples of changing default values for commands." />
<meta name="DC.Relation" scheme="URI" content="ccdcp.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="expl1" />
<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>Examples: Change command defaults</title>
</head>
<body id="expl1"><a name="expl1"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Examples: Change command defaults</h1>
<div><p>These provide examples of changing default values for commands.</p>
<div class="section"> <ul><li><p>To provide a default value of *NOMAX for the MAXMBRS keyword of command <span class="cmdname">Create
Physical File (CRTPF)</span>, do the following: </p>
<pre> CRTPF FILE(FILE1) RCDLEN(96) MAXMBRS(1)
.
.
CHGCMDDFT CMD(CRTPF) NEWDFT('MAXMBRS(*NOMAX)')</pre>
</li>
<li><p>To provide a default value of 10 for the MAXMBRS keyword of the command <span class="cmdname">Create
Physical File (CRTPF)</span>, do the following: </p>
<pre> CRTPF FILE(FILE1) RCDLEN(96) MAXMBRS(*NOMAX)
.
.
CHGCMDDFT CMD(CRTPF) NEWDFT('MAXMBRS(10)')</pre>
</li>
<li><div class="p">The following allows you to provide a default value of LIB001 for the
first qualifier of the SRCFILE keyword and FILE001 for the second qualifier
of the SRCFILE keyword for the command <span class="cmdname">Create CL Program (CRTCLPGM)</span>.
The AUT keyword now have a default value of *EXCLUDE. <pre> CRTCLPGM PGM(PROGRAM1) SRCFILE(*LIBL/QCMDSRC)
.
.
CHGCMDDFT CMD(CRTCLPGM) +
NEWDFT('SRCFILE(LIB001/FILE001) AUT(*EXCLUDE)')</pre>
</div>
</li>
<li><p>The following provides a default value of 'Isn't this print text' for
the PRTTXT keyword of the command <span class="cmdname">Change Job (CHGJOB)</span>.
Since the NEWDFT keyword has embedded apostrophes, you must not double these
apostrophes, or the process will not run correctly. </p>
<pre> CHGJOB PRTTXT('Isn''t this print text')
.
.
CHGCMDDFT CMD(CHGJOB) +
NEWDFT('PRTTXT(''Isn''''t this print text'')')</pre>
</li>
<li><p>The following provides a default value of QGPL for the first qualifier
(library name) of the first list item of the DTAMBRS keyword for the command <span class="cmdname">Create
Logical File (CRTLF)</span>. The new default value for the second list
item of the DTAMBRS keyword (member name) is MBR1. </p>
<pre> CRTLF FILE(FILE1) DTAMBRS(*ALL)
.
.
CHGCMDDFT CMD(CRTLF) +
NEWDFT('DTAMBRS((QGPL/*N (MBR1)))')</pre>
<p>Since *ALL is a SNGVAL (single value) for the entire DTAMBRS
list, the defaults of *CURRENT for the library name and *NONE for the member
name do not show up on the original command prompt display. The defaults
*CURRENT and *NONE can be changed to a new default value but do not show up
on the original prompt display because of the *ALL single value for the entire
DTAMBRS list.</p>
</li>
<li><p>To create a command that will display the spool files for a job, do
the following: </p>
<pre> CRTDUPOBJ OBJ(WRKJOB) FROMLIB(QSYS) +
TOLIB(MYLIB) NEWOBJ(WRKJOBSPLF)
WRKJOBSPLF OPTION(*SPLF)
.
.
CHGCMDDFT CMD(MYLIB/WRKJOBSPLF) +
NEWDFT('OPTION(*SPLF)')</pre>
</li>
</ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="ccdcp.htm" title="Some changes can be made to the command definition of a command with no further action. Other changes may require the program or procedure to be recreated, or may cause the program or procedure to function differently.">Effect of changing the command definition of a command in a procedure or program</a></div>
</div>
</div>
</body>
</html>