194 lines
11 KiB
HTML
194 lines
11 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">
|
||
|
<title>Change Command Default (CHGCMDDFT)</title>
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body bgcolor="white">
|
||
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<a name="CHGCMDDFT.Top_Of_Page"></a>
|
||
|
<h2>Change Command Default (CHGCMDDFT)</h2>
|
||
|
<table width="100%">
|
||
|
<tr>
|
||
|
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
|
||
|
<b>Threadsafe: </b>No
|
||
|
</td>
|
||
|
<td valign="top" align="right">
|
||
|
<a href="#CHGCMDDFT.PARAMETERS.TABLE">Parameters</a><br>
|
||
|
<a href="#CHGCMDDFT.COMMAND.EXAMPLES">Examples</a><br>
|
||
|
<a href="#CHGCMDDFT.ERROR.MESSAGES">Error messages</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<div> <a name="CHGCMDDFT"></a>
|
||
|
<p>The Change Command Default (CHGCMDDFT) command changes the default value of a command parameter.
|
||
|
</p>
|
||
|
<p>The parameter must have an existing default to change to a new default value. The changed command can be either an IBM-supplied command or a user-defined command.
|
||
|
</p>
|
||
|
<p>To find out which parameters of a command have default values, enter the command name and press the F4 key (Prompt) to prompt for the command. Default values for parameters are shown on the first command prompt screen. However, not all defaults are shown. A parameter that is a list of elements or a qualified name may have a single value (SNGVAL) as the default of the entire list or qualified name. For example, Display Job (DSPJOB) is a command in which JOB is a list of elements but has a SNGVAL as the default for the entire list. See 'Additional Considerations' for more information on SNGVAL as a default value.
|
||
|
</p>
|
||
|
<p>The new parameter default must be valid for the parameter being changed. To find out which values are valid, move the cursor to the default value shown and press the F4 key. The Parameter Prompt with Permissible Values display shows a list of valid values and/or the value of the parameter type. When only a list of valid values is shown, only those values can be used as new default values. Otherwise, any valid value that conforms to the requirements of the parameter can be used as the new default.
|
||
|
</p>
|
||
|
<p>Processing a command that had earlier default value changes is the same as specifying the new default value for the parameter on an unchanged copy of the same command. The new default value may conflict with other parameter combinations even when the parameter is not explicitly specified.
|
||
|
</p>
|
||
|
<p>When the user runs system commands with default value changes from system displays, the new default values cannot be used. This occurs because the system cannot use the command device to process a function. Instead, the system can use an IBM internal device to a system program to run the requested function. Therefore, use the F4 key (Prompt) key to prompt for the system command when processing the command from a system display. In most cases, the specified default value is then used.
|
||
|
</p>
|
||
|
<p>To change an IBM-supplied command, the user should create a copy of the command in a user library and change the defaults of the copied command, instead of the IBM-supplied command itself. The user library should be listed before the library QSYS on the library list. Save the source of the CHGCMDDFT command so that the changes can be identified later. This procedure allows the user to use the original IBM-supplied command defaults when necessary and ensures that changes made to the copied commands are not overlaid when a new release on the system is installed.
|
||
|
</p>
|
||
|
<p>A compatibility problem can occur when a new release of the system is installed. If IBM-supplied commands have been copied into a user library and the newly installed IBM-supplied version of the command has had new parameters added to it, the copied version of the command does not run correctly. This is a result of parameter mismatches between the copied command and the newly installed IBM-supplied command processing program. Also, if a copied command is used in the starting program of a user profile, this program does not run correctly, again because of parameter mismatches between the old command and the new command processing program. As a result, the user cannot sign onto the system. To prevent this, the user should ensure that at least one user profile exists on the system which has authority to make the required changes to the starting programs and has QCMD as the starting program. An alternative is to code the starting programs to detect all errors and to recover by showing the Command Entry display (program QCMD).
|
||
|
</p>
|
||
|
<p>The CL information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter, contains a list of recommendations and examples for using the Change Command Default (CHGCMDDFT) command.
|
||
|
</p>
|
||
|
<p><b>Additional Considerations</b>
|
||
|
</p>
|
||
|
<p>A keyword that is defined as a list of elements or as a qualified name, and has a SNGVAL as the default, can have a required element or qualifier as the first element in the list of elements or qualified name. The default SNGVAL may be changed to another valid SNGVAL if one exists, but the required element or qualifier cannot have a default value. A SNGVAL cannot be used as a new default value if the existing default value is <i>not</i> a SNGVAL. To find out if list elements or qualifiers of a qualified name have default values, change the SNGVAL to a valid value for the keyword, blank out remaining list elements or qualifiers, and press the Enter key. If any remaining list elements or qualifiers have default values, the default values now appear in the input field for the list element or qualifier.
|
||
|
</p>
|
||
|
<p><b>Restriction:</b> The user must have object management and *USE authority for the command being changed.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CHGCMDDFT.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
|
||
|
<div>
|
||
|
<h3><a name="CHGCMDDFT.PARAMETERS.TABLE">Parameters</a></h3>
|
||
|
<table border="1" cellpadding="4" cellspacing="0">
|
||
|
<!-- col1="10" col2="15" col3="30" col4="10" -->
|
||
|
<tr>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
|
||
|
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top" rowspan="3"><a href="#CHGCMDDFT.CMD"><b>CMD</b></a></td>
|
||
|
<td valign="top">Command</td>
|
||
|
<td valign="top"><i>Qualified object name</i></td>
|
||
|
<td valign="top" rowspan="3">Required, Positional 1</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top">Qualifier 1: Command</td>
|
||
|
<td valign="top"><i>Name</i></td>
|
||
|
</tr><tr>
|
||
|
<td valign="top">Qualifier 2: Library</td>
|
||
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
||
|
</tr><tr>
|
||
|
<td valign="top"><a href="#CHGCMDDFT.NEWDFT"><b>NEWDFT</b></a></td>
|
||
|
<td valign="top">New default parameter string</td>
|
||
|
<td valign="top"><i>Character value</i></td>
|
||
|
<td valign="top">Required, Positional 2</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CHGCMDDFT.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div> <a name="CHGCMDDFT.CMD"></a>
|
||
|
<h3>Command (CMD)</h3>
|
||
|
<p>Specifies the command to be changed. The command can be a user-defined or an IBM-supplied command.
|
||
|
</p>
|
||
|
<p><b>Qualifier 1: Command</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the command whose parameter defaults are to be changed.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p><b>Qualifier 2: Library</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*LIBL</u></b></dt>
|
||
|
<dd>All libraries in the library list for the current thread are searched until the first match is found.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl>
|
||
|
<dt><b>*CURLIB</b></dt>
|
||
|
<dd>The current library for the job is used to locate the command. If no library is specified as the current library for the job, QGPL is used.
|
||
|
</dd>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the library where the command is located.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CHGCMDDFT.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CHGCMDDFT.NEWDFT"></a>
|
||
|
<h3>New default parameter string (NEWDFT)</h3>
|
||
|
<p>Specifies the parameter string, enclosed in apostrophes, that contains the new default values being assigned to a parameter, element, or qualifier if a value is not specified by the user when the command is processed. New default values can be specified only for those parameters, elements, or qualifiers that already have a default value.
|
||
|
</p>
|
||
|
<p>*N must be used as a place holder in a qualified name or in a list of values to take the place of elements or qualifiers that do not have existing default values. If the elements or qualifiers have default values but are not to be changed to a new default value, then *N or the existing default value can be used as the place holder in the list of values or the qualified name.
|
||
|
</p>
|
||
|
<p>
|
||
|
<b>Note: </b>Checking between parameters and validity checking program processing is done when the command is run. Neither are performed during the changing of the default value.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><i>character-value</i></b></dt>
|
||
|
<dd>Specify the new default parameter value string, enclosed in apostophes.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CHGCMDDFT.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="CHGCMDDFT.COMMAND.EXAMPLES">Examples</a> </h3>
|
||
|
<p>The following examples show changes in the defaults of command parameters when the CHGCMDDFT command is processed.
|
||
|
</p>
|
||
|
<p><b>Example 1: Changing Default Value of AUT Parameter</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
CHGCMDDFT CMD(CRTPF) NEWDFT('AUT(*EXCLUDE)')
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command changes the AUT default from *CHANGE to *EXCLUDE on the Create Physical File (CRTPF) command.
|
||
|
</p>
|
||
|
<p><b>Example 2: Changing CRTCLPGM Command Defaults</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
CHGCMDDFT CMD(USRQSYS/CRTCLPGM)
|
||
|
NEWDFT('PGM(LIB1/*N) SRCFILE(LIB1/FILE1) LOG(*YES)')
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command changes the defaults of the Create CL Program (CRTCLPGM) command when the NEWDFT parameter is specified in the form above. In the example, the default value of the LOG parameter is *YES. No default can be specified for the second qualifier (program-name) of the PGM parameter because no default value exists. Therefore, *N is used as the place holder for the second qualifier. The first qualifier (library-name) of the PGM parameter has a default value of LIB1. For the SRCFILE parameter, the first qualifier (library-name) has a default value of LIB1. The second qualifier (source-file-name) has a default value of FILE1.
|
||
|
</p>
|
||
|
<p><b>Example 3: Changing CRTPF Default Value of MAXMBRS Parameter</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
CHGCMDDFT CMD(CRTPF) NEWDFT('MAXMBRS(*NOMAX)')
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command changes the default value of the MAXMBRS keyword on the CRTPF command to *NOMAX.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CHGCMDDFT.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="CHGCMDDFT.ERROR.MESSAGES">Error messages</a> </h3>
|
||
|
<p><b><u>*ESCAPE Messages</u></b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b>CPF6216</b></dt>
|
||
|
<dd>Command &1 not valid for &2 command
|
||
|
</dd>
|
||
|
<dt><b>CPF6260</b></dt>
|
||
|
<dd>Errors detected while changing defaults.
|
||
|
</dd>
|
||
|
<dt><b>CPF6261</b></dt>
|
||
|
<dd>Cannot change command &1 in library &2.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CHGCMDDFT.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|