231 lines
7.6 KiB
HTML
231 lines
7.6 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 Environment Variable (CHGENVVAR)</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="CHGENVVAR.Top_Of_Page"></a>
|
||
|
<h2>Change Environment Variable (CHGENVVAR)</h2>
|
||
|
<table width="100%">
|
||
|
<tr>
|
||
|
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
|
||
|
<b>Threadsafe: </b>Yes
|
||
|
</td>
|
||
|
<td valign="top" align="right">
|
||
|
<a href="#CHGENVVAR.PARAMETERS.TABLE">Parameters</a><br>
|
||
|
<a href="#CHGENVVAR.COMMAND.EXAMPLES">Examples</a><br>
|
||
|
<a href="#CHGENVVAR.ERROR.MESSAGES">Error messages</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<div> <a name="CHGENVVAR"></a>
|
||
|
<p>The Change Environment Variable (CHGENVVAR) command changes the value for an existing environment variable.
|
||
|
</p>
|
||
|
<p><b>Restriction:</b> You must have *JOBCTL special authority to use this command to change system-level environment variables.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CHGENVVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
|
||
|
<div>
|
||
|
<h3><a name="CHGENVVAR.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"><a href="#CHGENVVAR.ENVVAR"><b>ENVVAR</b></a></td>
|
||
|
<td valign="top">Environment variable</td>
|
||
|
<td valign="top"><i>Character value</i></td>
|
||
|
<td valign="top">Required, Positional 1</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CHGENVVAR.VALUE"><b>VALUE</b></a></td>
|
||
|
<td valign="top">New value</td>
|
||
|
<td valign="top"><i>Character value</i>, <b><u>*SAME</u></b>, *NULL</td>
|
||
|
<td valign="top">Optional, Positional 2</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CHGENVVAR.CCSID"><b>CCSID</b></a></td>
|
||
|
<td valign="top">Coded character set ID</td>
|
||
|
<td valign="top">1-65535, *JOB, *HEX, <b><u>*SAME</u></b></td>
|
||
|
<td valign="top">Optional, Positional 3</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#CHGENVVAR.LEVEL"><b>LEVEL</b></a></td>
|
||
|
<td valign="top">Level</td>
|
||
|
<td valign="top"><b><u>*JOB</u></b>, *SYS</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CHGENVVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div> <a name="CHGENVVAR.ENVVAR"></a>
|
||
|
<h3>Environment variable (ENVVAR)</h3>
|
||
|
<p>Specifies the name of the environment variable to be changed. If an environment variable by this name does not exist at the specified level (LEVEL parameter), error message CPFA981 is issued.
|
||
|
</p>
|
||
|
<p>
|
||
|
<b>Note: </b>The case is preserved when lowercase characters are specified.
|
||
|
</p>
|
||
|
<p>If an apostrophe is intended, two apostrophes must be used ('').
|
||
|
</p>
|
||
|
<p>This is a required parameter.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CHGENVVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CHGENVVAR.VALUE"></a>
|
||
|
<h3>Initial value (VALUE)</h3>
|
||
|
<p>Specifies the environment variable value.
|
||
|
</p>
|
||
|
<p>The possible values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*SAME</u></b></dt>
|
||
|
<dd>The value does not change.
|
||
|
</dd>
|
||
|
<dt><b>*NULL</b></dt>
|
||
|
<dd>The value of the environment variable is the null character (X'00'). This value can be used to stop the association of the current environment variable value with the specified environment variable name.
|
||
|
</dd>
|
||
|
<dt><b><i>environment-variable-value</i></b></dt>
|
||
|
<dd>Specify the value of the environment variable. CHGENVVAR limits value to a maximum of 1024 bytes in length. Valid values include all EBCDIC characters. The value must be enclosed in apostrophes if it contains any non-alphanumeric character or blanks. If an apostrophe is intended, two apostrophes must be used ('').
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p>
|
||
|
<b>Note: </b>The case is preserved when lowercase characters are specified.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CHGENVVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CHGENVVAR.CCSID"></a>
|
||
|
<h3>Coded character set ID (CCSID)</h3>
|
||
|
<p>Specifies the coded character set identifier (CCSID) of the text supplied on the ENVVAR and the VALUE parameters. This value is stored with the environment variable.
|
||
|
</p>
|
||
|
<p>The possible values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*SAME</u></b></dt>
|
||
|
<dd>The value does not change.
|
||
|
</dd>
|
||
|
<dt><b>*JOB</b></dt>
|
||
|
<dd>The CCSID of the text is assumed to be the CCSID of the job running this command.
|
||
|
</dd>
|
||
|
<dt><b>*HEX</b></dt>
|
||
|
<dd>The CCSID of 65535 is stored with this environment variable.
|
||
|
</dd>
|
||
|
<dt><b><i>coded-character-set-identifier</i></b></dt>
|
||
|
<dd>Specify the CCSID to be stored with the environment variable. Valid values range from 1 through 65535.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CHGENVVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="CHGENVVAR.LEVEL"></a>
|
||
|
<h3>Level (LEVEL)</h3>
|
||
|
<p>Specifies the level of the environment variable.
|
||
|
</p>
|
||
|
<p>The possible values are:
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*JOB</u></b></dt>
|
||
|
<dd>This is a job-level environment variable.
|
||
|
</dd>
|
||
|
<dt><b>*SYS</b></dt>
|
||
|
<dd>This is a system-level environment variable.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p>
|
||
|
<b>Note: </b>This field is only used to specify the level of the environment variable that is being changed, and cannot be used to change the level of the environment variable.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CHGENVVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="CHGENVVAR.COMMAND.EXAMPLES">Examples</a> </h3>
|
||
|
<p><b>Example 1: Change a Job-level Environment Variable</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
CHGENVVAR ENVVAR(altdir) VALUE('/mydir/test')
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command changes the value of the job-level environment variable named altdir to the value /mydir/test. The CCSID that is stored with the environment variable is not changed.
|
||
|
</p>
|
||
|
<p><b>Example 2: Change the CCSID of an Environment Variable</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
CHGENVVAR ENVVAR(altdir) CCSID(273)
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command changes the CCSID of the job-level environment variable named altdir to 273. The environment variable value is not changed.
|
||
|
</p>
|
||
|
<p><b>Example 3: Set an Environment Variable to Null</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
CHGENVVAR ENVVAR(LIBPATH) VALUE(*NULL)
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command changes the value of the job-level environment variable named LIBPATH to the null (x'00') character.
|
||
|
</p>
|
||
|
<p><b>Example 4: Change a System-level Environment Variable</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
CHGENVVAR ENVVAR(home) VALUE('/usr/home') LEVEL(*SYS)
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command changes the value of the system-level environment variable named home to /usr/home.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CHGENVVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="CHGENVVAR.ERROR.MESSAGES">Error messages</a> </h3>
|
||
|
<p><b><u>*ESCAPE Messages</u></b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b>CPFA981</b></dt>
|
||
|
<dd>Environment variable does not exist.
|
||
|
</dd>
|
||
|
<dt><b>CPFA982</b></dt>
|
||
|
<dd>ENVVAR character not valid.
|
||
|
</dd>
|
||
|
<dt><b>CPFA983</b></dt>
|
||
|
<dd>Unexpected error occurred.
|
||
|
</dd>
|
||
|
<dt><b>CPFA984</b></dt>
|
||
|
<dd>Maximum number of environment variables exist.
|
||
|
</dd>
|
||
|
<dt><b>CPFA98E</b></dt>
|
||
|
<dd>*JOBCTL special authority required to update system-level environment variables.
|
||
|
</dd>
|
||
|
<dt><b>CPF3BCA</b></dt>
|
||
|
<dd>CCSID &1 not supported.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#CHGENVVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|