283 lines
13 KiB
HTML
283 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>Display Program Variable (DSPPGMVAR)</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="DSPPGMVAR.Top_Of_Page"></a>
|
||
|
<h2>Display Program Variable (DSPPGMVAR)</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="#DSPPGMVAR.PARAMETERS.TABLE">Parameters</a><br>
|
||
|
<a href="#DSPPGMVAR.COMMAND.EXAMPLES">Examples</a><br>
|
||
|
<a href="#DSPPGMVAR.ERROR.MESSAGES">Error messages</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<div> <a name="DSPPGMVAR"></a>
|
||
|
<p>The Display Program Variable (DSPPGMVAR) command shows the current value of one or more program variables in a program that is being debugged. The variables can be specified either by their variable names or by their machine-instruction object-definition-table-vector (MI ODV) numbers. A maximum of 10 variables can be specified.
|
||
|
</p>
|
||
|
<p><b>Restrictions:</b>
|
||
|
</p>
|
||
|
<ul>
|
||
|
<li>You can use this command only in debug mode. To start debug mode, refer to the Start Debug (STRDBG) command.
|
||
|
</li>
|
||
|
<li>You cannot use this command if you are servicing another job, and that job is on a job queue, or is being held, suspended, or ended.
|
||
|
</li>
|
||
|
</ul>
|
||
|
<ul>
|
||
|
<li>You cannot use this command to display variables in a bound program.
|
||
|
</li>
|
||
|
<li>You cannot use this command to display variables within the system domain unless the user has *SERVICE special authority.
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#DSPPGMVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
|
||
|
<div>
|
||
|
<h3><a name="DSPPGMVAR.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="#DSPPGMVAR.PGMVAR"><b>PGMVAR</b></a></td>
|
||
|
<td valign="top">Program variables</td>
|
||
|
<td valign="top">Values (up to 10 repetitions): <i>Element list</i></td>
|
||
|
<td valign="top" rowspan="3">Required, Positional 1</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top">Element 1: Program variable</td>
|
||
|
<td valign="top">
|
||
|
<i>Character value</i>, *CHAR</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top">Element 2: Basing pointer variable</td>
|
||
|
<td valign="top">
|
||
|
Values (up to 5 repetitions): <i>Character value</i></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#DSPPGMVAR.OUTFMT"><b>OUTFMT</b></a></td>
|
||
|
<td valign="top">Output format</td>
|
||
|
<td valign="top"><b><u>*CHAR</u></b>, *HEX</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#DSPPGMVAR.OUTPUT"><b>OUTPUT</b></a></td>
|
||
|
<td valign="top">Output</td>
|
||
|
<td valign="top"><b><u>*</u></b>, *PRINT</td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#DSPPGMVAR.PGM"><b>PGM</b></a></td>
|
||
|
<td valign="top">Program</td>
|
||
|
<td valign="top"><i>Name</i>, <b><u>*DFTPGM</u></b></td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#DSPPGMVAR.START"><b>START</b></a></td>
|
||
|
<td valign="top">Char output start position</td>
|
||
|
<td valign="top"><i>Integer</i>, <b><u>1</u></b></td>
|
||
|
<td valign="top">Optional, Positional 2</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#DSPPGMVAR.LEN"><b>LEN</b></a></td>
|
||
|
<td valign="top">Characters to display</td>
|
||
|
<td valign="top"><i>Integer</i>, <b><u>*DCL</u></b></td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td valign="top"><a href="#DSPPGMVAR.RCRLVL"><b>RCRLVL</b></a></td>
|
||
|
<td valign="top">Recursion level</td>
|
||
|
<td valign="top"><i>Integer</i>, <b><u>*LAST</u></b></td>
|
||
|
<td valign="top">Optional</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#DSPPGMVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div> <a name="DSPPGMVAR.PGMVAR"></a>
|
||
|
<h3>Program variables (PGMVAR)</h3>
|
||
|
<p>Specifies up to ten program variables whose values are to be shown. The variables can be in a high-level language (HLL) or machine instruction (MI) program.
|
||
|
</p>
|
||
|
<p>This is a required parameter.
|
||
|
</p>
|
||
|
<p><b>Element 1: Program variable</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b>*CHAR</b></dt>
|
||
|
<dd>This special value can be specified instead of a variable name if a basing pointer is specified. This shows a character view of a pointer to be shown without the use of a based variable.
|
||
|
</dd>
|
||
|
<dt><b><i>character-value</i></b></dt>
|
||
|
<dd>Specify the name of the program variable to be shown. The name must be enclosed in apostrophes if it contains special characters.
|
||
|
<p>If the program variable is an array, the subscripts representing the elements in the array can be specified. If an array name is specified without any subscripts, all of the array elements are recorded. A single-dimensional cross-section can also be specified. Up to 132 characters may be specified for this program variable entry. This includes any qualifiers, subscripts, blanks, parentheses, and commas. It does not include the enclosing apostrophes when special characters are used. An integer, machine-interface object-definition-table-vector (MI ODV) number, asterisk (single-dimensional cross-section), or a numeric variable name can be specified for a subscript.
|
||
|
</p>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<p><b>Element 2: Basing pointer variable</b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><i>character-value</i></b></dt>
|
||
|
<dd>Specify the name of a basing pointer variable. In some languages, the program variable may be based on a pointer variable. This set of values allows you to explicitly specify the basing pointers for the variable to be recorded. Each basing pointer name must be enclosed in apostrophes if it contains special characters.
|
||
|
<p>If the basing pointer is an array, the subscripts representing an element in the array must be specified. Up to 132 characters can be specified for a basing pointer name. This includes any qualifiers, subscripts, embedded blanks, parentheses, and commas. It does not include the enclosing apostrophes when special characters are used. An integer, MI ODV number, or a numeric variable name can be specified for a subscript.
|
||
|
</p>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#DSPPGMVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="DSPPGMVAR.OUTFMT"></a>
|
||
|
<h3>Output format (OUTFMT)</h3>
|
||
|
<p>Specifies the format in which the values of the program variables are shown. Additional descriptive information for some variable types is also shown with the variable values in a format predefined by the system.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*CHAR</u></b></dt>
|
||
|
<dd>The program variables are shown in character form.
|
||
|
</dd>
|
||
|
<dt><b>*HEX</b></dt>
|
||
|
<dd>The program variables are shown in hexadecimal form.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#DSPPGMVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="DSPPGMVAR.OUTPUT"></a>
|
||
|
<h3>Output (OUTPUT)</h3>
|
||
|
<p>Specifies whether the output from the command is displayed at the requesting work station or printed with the job's spooled output.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*</u></b></dt>
|
||
|
<dd>The output is displayed (if requested by an interactive job) or printed with the job's spooled output (if requested by a batch job).
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl>
|
||
|
<dt><b>*PRINT</b></dt>
|
||
|
<dd>The output is printed with the job's spooled output.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#DSPPGMVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="DSPPGMVAR.PGM"></a>
|
||
|
<h3>Program (PGM)</h3>
|
||
|
<p>Specifies the name of the program that contains the program variables shown.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*DFTPGM</u></b></dt>
|
||
|
<dd>The program previously specified as the default program has its variables shown.
|
||
|
</dd>
|
||
|
<dt><b><i>name</i></b></dt>
|
||
|
<dd>Specify the name of the program whose program variables are shown.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#DSPPGMVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="DSPPGMVAR.START"></a>
|
||
|
<h3>Char output start position (START)</h3>
|
||
|
<p>Specifies, for string variables only, the starting position in the string from which the value of the variable is to be shown. If more than one string variable is specified for the <b>Program variables (PGMVAR)</b> parameter, the same starting position value is used for each one. For a bit string, the value specifies the starting bit position; for a character string, the value specifies the starting character position.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>1</u></b></dt>
|
||
|
<dd>The variable is shown from the first position on through the length specified for the <b>Characters to display (LEN)</b> parameter.
|
||
|
</dd>
|
||
|
<dt><b><i>integer</i></b></dt>
|
||
|
<dd>Specify the first position in the string to be shown. The value supplied for the <b>Char output start position (START)</b> parameter must not be larger than the maximum string length for any variable specified, except that a value of <b>1</b> for the START parameter is allowed if the maximum length for a string is zero. The value supplied for the LEN parameter plus the value supplied for the START parameter minus one must not be greater than the maximum string length. These checks are made for each string variable specified for the PGMVAR parameter.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#DSPPGMVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="DSPPGMVAR.LEN"></a>
|
||
|
<h3>Characters to display (LEN)</h3>
|
||
|
<p>Specifies, for string variables only, the length of the string shown when the breakpoint is reached, starting at the position specified by the <b>Char output start position (START)</b> parameter. If more than one string variable is specified for the <b>Program variables (PGMVAR)</b> parameter, the same value is used for each one. For a bit string, the value specifies the number of bits shown, and for a character string, the value specifies the number of characters shown.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*DCL</u></b></dt>
|
||
|
<dd>The string variable is shown to the end of the string or for a value of 200 bytes, whichever is less. If the string variable has a maximum length of zero, the only allowable value for the LEN parameter is *DCL.
|
||
|
</dd>
|
||
|
<dt><b><i>integer</i></b></dt>
|
||
|
<dd>Specify the length of the data shown. The length (as well as the combination of values supplied for the START parameter and the LEN parameter must be no greater than the length of the shortest string specified by the PGMVAR parameter.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#DSPPGMVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<div> <a name="DSPPGMVAR.RCRLVL"></a>
|
||
|
<h3>Recursion level (RCRLVL)</h3>
|
||
|
<p>Specifies which recursion level of the program contains the variable whose value is to be displayed. Recursion level 1 is the first (or earliest) call of the program, recursion level 2 is the second call of the program, and so on to the last (most recent) recursion level in the stack. For example, if program A calls program B, then program B calls program A, a new recursion level of program A is formed. If the first call of program A contains the variable to be displayed, a value of 1 for the <b>Recursion level (RCRLVL)</b> parameter must be specified. Some high-level languages also allow recursive procedures.
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b><u>*LAST</u></b></dt>
|
||
|
<dd>The value of the specified variable in the last (most recent) call of the specified program is displayed.
|
||
|
</dd>
|
||
|
<dt><b><i>integer</i></b></dt>
|
||
|
<dd>Specify the recursion level of the program that contains the variable whose value is to be displayed.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#DSPPGMVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="DSPPGMVAR.COMMAND.EXAMPLES">Examples</a> </h3>
|
||
|
<p><b>Example 1: Displaying Program Variables</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
DSPPGMVAR PGMVAR('&QUANT') PGM(MYPROG)
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>Assuming that the program MYPROG is in debug mode, this command shows the name and current value of the CL variable called &QUANT its type and length are also shown.
|
||
|
</p>
|
||
|
<p><b>Example 2: Displaying Program Variables</b>
|
||
|
</p>
|
||
|
<p>
|
||
|
<pre>
|
||
|
DSPPGMVAR PGMVAR(TOTSALES MANHRS) PGM(REGION) RCRLVL(1)
|
||
|
</pre>
|
||
|
</p>
|
||
|
<p>This command shows the program variables TOTSALES and MANHRS of the first call of the program REGION.
|
||
|
</p>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#DSPPGMVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
<hr size="2" width="100%">
|
||
|
<div><h3><a name="DSPPGMVAR.ERROR.MESSAGES">Error messages</a> </h3>
|
||
|
<p><b><u>*ESCAPE Messages</u></b>
|
||
|
</p>
|
||
|
<dl>
|
||
|
<dt><b>CPF1999</b></dt>
|
||
|
<dd>Errors occurred on command.
|
||
|
</dd>
|
||
|
</dl>
|
||
|
</div>
|
||
|
<table width="100%">
|
||
|
<tr><td align="right"><a href="#DSPPGMVAR.Top_Of_Page">Top</a></td></tr>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|