ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/chgdtaara.htm

349 lines
13 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 Data Area (CHGDTAARA)</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="CHGDTAARA.Top_Of_Page"></a>
<h2>Change Data Area (CHGDTAARA)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>Conditional
</td>
<td valign="top" align="right">
<a href="#CHGDTAARA.PARAMETERS.TABLE">Parameters</a><br>
<a href="#CHGDTAARA.COMMAND.EXAMPLES">Examples</a><br>
<a href="#CHGDTAARA.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="CHGDTAARA"></a>
<p>The Change Data Area (CHGDTAARA) command changes the value of the local data area (*LDA), the group data area (*GDA), the program initialization parameter data area (*PDA), or the specified data area that is stored in a library. The new value must have the same type and a length less than or equal to the data area length or the specified substring length.
</p>
<p>In group jobs, the data area specified may be the group data area (*GDA). This data area is automatically associated with the group and cannot be accessed from jobs outside the group. The length of this character data area is 512 bytes. More information about group jobs is in the Work Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
<p>The local data area (*LDA) is a character data area 1024 bytes in length. It is automatically associated with your job and other jobs cannot get access to it.
</p>
<p>In prestart jobs, the data area specified may be the data area that contains program initialization parameter data (*PDA). This data area is automatically associated with your prestart job and other jobs cannot get access to it. The length of this character data area is 2000 bytes. More information about prestart jobs is in the Work Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
<p>For character data areas, a substring of the data area can be changed without affecting the remainder of the data area. This substring is defined by specifying the starting position and the length of the substring. In this case, the new value must have a length less than or equal to the substring length.
</p>
<p>When this command is run to change a data area other than the local data area, group data area, or program initialization parameter data area, the data area is locked by the job or thread during the change operation so that commands in other jobs cannot change or delete it until the operation is completed. If the data area is shared with other jobs and it is updated in steps involving more than one command in a job, the data area should be explicitly allocated to that job until all the steps have been performed. Data areas, other than the group data area , local data area, or program initialization parameter data area can be explicitly allocated with the Allocate Object (ALCOBJ) command; no allocation is necessary when the CHGDTAARA command is run specifying the group data area, local data area, or program initialization parameter data area.
</p>
<p><b>Restrictions:</b>
</p>
<ol>
<li>To use this command, the user must have change (*CHANGE) authority for the data area being changed and execute (*EXECUTE) authority for the library in which it is stored. No specific authority is required for the local data area, group data area, or program initialization parameter data area.
</li>
<li>This command is conditionally threadsafe. The following restrictions apply:
<ol>
<li>Changing DDM data areas in a job that allows multiple threads is not threadsafe.
</li>
<li>Changing DDM data areas will fail when more than one thread is active in a job.
</li>
<li>Changing the special data areas (*LDA, *GDA and *PDA) is allowed from the initial thread only and will fail if attempted from a secondary thread.
</li>
</ol>
</li>
</ol>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGDTAARA.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="CHGDTAARA.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="7"><a href="#CHGDTAARA.DTAARA"><b>DTAARA</b></a></td>
<td valign="top">Data area specification</td>
<td valign="top"><i>Element list</i></td>
<td valign="top" rowspan="7">Required, Positional 1</td>
</tr>
<tr>
<td valign="top">Element 1: Data area</td>
<td valign="top">
Single values: *LDA, *GDA, *PDA<br>Other values: <i>Qualified object name</i></td>
</tr>
<tr>
<td valign="top" style="padding-left:10pt">Qualifier 1: Data area</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top" style="padding-left:10pt">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top">Element 2: Substring specifications</td>
<td valign="top">
Single values: <b><u>*ALL</u></b><br>Other values: <i>Element list</i></td>
</tr>
<tr>
<td valign="top" style="padding-left:10pt">Element 1: Substring starting position</td>
<td valign="top">
1-2000</td>
</tr>
<tr>
<td valign="top" style="padding-left:10pt">Element 2: Substring length</td>
<td valign="top">
1-2000</td>
</tr>
<tr>
<td valign="top"><a href="#CHGDTAARA.VALUE"><b>VALUE</b></a></td>
<td valign="top">New value</td>
<td valign="top"><i>Not restricted</i></td>
<td valign="top">Required, Positional 2</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#CHGDTAARA.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="CHGDTAARA.DTAARA"></a>
<h3>Data area specification (DTAARA)</h3>
<p>Specifies the name and library of the data area whose value is being changed. It optionally specifies, for character data areas only, the starting position and length of the character string that is changed in the data area.
</p>
<p>This is a required parameter.
</p>
<p><b>Element 1: Data area</b>
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b>*LDA</b></dt>
<dd>The local data area associated with your job is changed. The length of this character data area is 1024 bytes.
</dd>
<dt><b>*GDA</b></dt>
<dd>The group data area associated with your group job is changed. The length of this character data area is 512 bytes.
</dd>
<dt><b>*PDA</b></dt>
<dd>The program initialization parameter data area associated with your prestart job is changed. The length of this character data area is 2000 bytes.
</dd>
</dl>
<dl>
<dt><b></b></dt>
<dd>
<p><b>Qualifier 1: Data area</b>
</p>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the data area to be changed.
</dd>
</dl>
</dd>
<dt><b></b></dt>
<dd>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the thread's library list are searched until a match is found.
</dd>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the thread is used to locate the object. If no library is specified as the current library for the thread, the QGPL library is used.
</dd>
</dl>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the library where the data area is located.
</dd>
</dl>
</dd>
</dl>
<p><b>Element 2: Substring specifications</b>
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b><u>*ALL</u></b></dt>
<dd>The entire data area is changed.
</dd>
</dl>
<dl>
<dt><b></b></dt>
<dd>
<p><b>Element 1: Substring starting position</b>
</p>
<dl>
<dt><b><i>1-2000</i></b></dt>
<dd>Specify the starting position of the data area being changed.
</dd>
</dl>
</dd>
<dt><b></b></dt>
<dd>
<p><b>Element 2: Substring length</b>
</p>
<dl>
<dt><b><i>1-2000</i></b></dt>
<dd>Specify the length of the data area substring being changed.
</dd>
</dl>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGDTAARA.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CHGDTAARA.VALUE"></a>
<h3>New value (VALUE)</h3>
<p>Specifies the new value stored in the data area. Specify a value that is valid for the data attributes specified in the data area's description. If *CHAR or *LGL was specified for the <b>Type (TYPE)</b> parameter of the Create Data Area (CRTDTAARA) command when the data area was created and the value specified here is numeric, the value must be enclosed in apostrophes. If *DEC was specified for the <b>Type (TYPE)</b> parameter of the CRTDTAARA command, the value must not be enclosed in apostrophes.
</p>
<p>This is a required parameter.
</p>
<dl>
<dt><b><i>unrestricted-value</i></b></dt>
<dd>Specify the value of the data area.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGDTAARA.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CHGDTAARA.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Changing the Data Area Value</b>
</p>
<p>
<pre>
CHGDTAARA DTAARA(MYLIB/MYDATA) VALUE(GOODNIGHT)
</pre>
</p>
<p>This command changes the value of the data area named MYDATA in library MYLIB to GOODNIGHT. The data area must be for character data and must be 9 or more characters in length.
</p>
<p><b>Example 2: Changing the Logical Value of the Data Area</b>
</p>
<p>
<pre>
CHGDTAARA DTAARA(PAYROLLSW) VALUE('0')
</pre>
</p>
<p>This command changes the logical value of the data area named PAYROLLSW to zero (0). The library search list is used to locate the data area.
</p>
<p><b>Example 3: Changing Specific Characters of the Local Data Area</b>
</p>
<p>
<pre>
CHGDTAARA DTAARA(*LDA (5 4)) VALUE('TWO')
</pre>
</p>
<p>This command changes characters 5 through 8 of the user's local data area. Because the new value is shorter than the substring, it is padded with a blank.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGDTAARA.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CHGDTAARA.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPF101A</b></dt>
<dd>Operation on DDM data area &amp;1 in &amp;2 failed.
</dd>
<dt><b>CPF1015</b></dt>
<dd>Data area &amp;1 in &amp;2 not found.
</dd>
<dt><b>CPF1018</b></dt>
<dd>No authority to change data area.
</dd>
<dt><b>CPF1019</b></dt>
<dd>VALUE parameter not correct.
</dd>
<dt><b>CPF1020</b></dt>
<dd>VALUE parameter too long.
</dd>
<dt><b>CPF1021</b></dt>
<dd>Library &amp;1 not found for data area &amp;2.
</dd>
<dt><b>CPF1022</b></dt>
<dd>No authority to library &amp;1 data area &amp;2.
</dd>
<dt><b>CPF1026</b></dt>
<dd>VALUE parameter must be '0' or '1'.
</dd>
<dt><b>CPF1043</b></dt>
<dd>Boundary alignment for data area not valid.
</dd>
<dt><b>CPF1044</b></dt>
<dd>AREA parameter not valid for data area.
</dd>
<dt><b>CPF1045</b></dt>
<dd>CPYPTR parameter not valid for data area.
</dd>
<dt><b>CPF1046</b></dt>
<dd>DTAARA(*GDA) not valid because job not group job.
</dd>
<dt><b>CPF1062</b></dt>
<dd>Null string not valid as character value.
</dd>
<dt><b>CPF1063</b></dt>
<dd>Cannot allocate data area &amp;1 in library &amp;2.
</dd>
<dt><b>CPF1067</b></dt>
<dd>Cannot allocate library &amp;1.
</dd>
<dt><b>CPF1072</b></dt>
<dd>DTAARA(*PDA) not valid because job not prestart job.
</dd>
<dt><b>CPF1087</b></dt>
<dd>Substring not allowed for decimal or logical data area.
</dd>
<dt><b>CPF1088</b></dt>
<dd>Starting position outside of data area.
</dd>
<dt><b>CPF1089</b></dt>
<dd>Substring specified for data area not valid.
</dd>
<dt><b>CPF1138</b></dt>
<dd>VALUE parameter not valid type for data area &amp;1.
</dd>
<dt><b>CPF1155</b></dt>
<dd>VALUE parameter too long for data area &amp;1.
</dd>
<dt><b>CPF1162</b></dt>
<dd>Boundary alignment for data area &amp;1 not valid.
</dd>
<dt><b>CPF1163</b></dt>
<dd>AREA parameter not valid for data area &amp;1.
</dd>
<dt><b>CPF1168</b></dt>
<dd>CPYPTR parameter not valid for data area &amp;1.
</dd>
<dt><b>CPF1170</b></dt>
<dd>Starting position outside of data area &amp;1.
</dd>
<dt><b>CPF1192</b></dt>
<dd>Substring specified for data area &amp;1 not valid.
</dd>
<dt><b>CPF180B</b></dt>
<dd>Function &amp;1 not allowed.
</dd>
<dt><b>CPF180C</b></dt>
<dd>Function &amp;1 not allowed.
</dd>
<dt><b>CPF18BE</b></dt>
<dd>Data area &amp;1 not changed because entry not journaled.
</dd>
<dt><b>CPF9899</b></dt>
<dd>Error occurred during processing of command.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CHGDTAARA.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>