503 lines
27 KiB
HTML
503 lines
27 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>Add Breakpoint (ADDBKP)</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="ADDBKP.Top_Of_Page"></a>
|
|
<h2>Add Breakpoint (ADDBKP)</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="#ADDBKP.PARAMETERS.TABLE">Parameters</a><br>
|
|
<a href="#ADDBKP.COMMAND.EXAMPLES">Examples</a><br>
|
|
<a href="#ADDBKP.ERROR.MESSAGES">Error messages</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div> <a name="ADDBKP"></a>
|
|
<p>The Add Breakpoint (ADDBKP) command sets up to ten breakpoints in a program. A breakpoint is a location in a program where processing stops and control is given to the user or to a specified program. The breakpoint is set when a statement number or label of a command or machine instruction is specified. The program is stopped just before processing begins on the statement (or machine instruction) on which the breakpoint is set.
|
|
</p>
|
|
<p>This command shows the values of certain program variables when any breakpoint in the program is reached. As many as 10 variables per breakpoint can be specified, and as many as 10 breakpoints per command can be set. However, the same program variables apply to every breakpoint specified in the command. To specify different sets of variables for each breakpoint, you must use separate commands.
|
|
</p>
|
|
<p>This command specifies conditional breakpoints in which the program is stopped when a condition is true. This condition involves two program variables or one program variable and a constant. When using conditional breakpoints, it is possible to stop the program when a program variable becomes a certain value.
|
|
</p>
|
|
<p>A conditional breakpoint can also be specified by specifying a skip value. The program does not stop until the breakpoint statements have been processed as many times as the skip number indicates. After that, the breakpoint causes the program to stop.
|
|
</p>
|
|
<p>When a breakpoint is reached in the interactive debugging environment, a display is shown to the user that identifies which breakpoint has been reached and (optionally) shows the values of the specified program variables when the program is stopped. This information is also written to the job log. From the display, the user can press the F10 key to show the command entry display, or press the F3 key to exit the display and cancel the program. The user can press the Enter key to allow the program to continue running.
|
|
</p>
|
|
<p>When a breakpoint is reached in the batch debugging environment, the breakpoint information is written to a printer file and, optionally, another program can be called to take action on the breakpoint condition. The name of the called program is specified on the <b>Breakpoint program to call (BKPPGM)</b> parameter.
|
|
</p>
|
|
<p>When an interactive job is debugging another job and a breakpoint is reached in the debugged job, a breakpoint display is shown. This display appears in the debugging job, interrupting what was previously being displayed. You must press the Enter key, allowing the stopped program to continue, before returning to the previous display.
|
|
</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>This command cannot be used to add breakpoints to a bound program.
|
|
</li>
|
|
</ul>
|
|
<ul>
|
|
<li>To use this command, you must have all object (*ALLOBJ) special authority.
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#ADDBKP.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
|
|
<div>
|
|
<h3><a name="ADDBKP.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="#ADDBKP.STMT"><b>STMT</b></a></td>
|
|
<td valign="top">Statement identifier</td>
|
|
<td valign="top">Values (up to 10 repetitions): <i>Character value</i></td>
|
|
<td valign="top">Required, Positional 1</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#ADDBKP.PGMVAR"><b>PGMVAR</b></a></td>
|
|
<td valign="top">Program variables</td>
|
|
<td valign="top">Single values: <b><u>*NONE</u></b><br>Other values (up to 10 repetitions): <i>Element list</i></td>
|
|
<td valign="top" rowspan="3">Optional, Positional 2</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="#ADDBKP.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, Positional 5</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#ADDBKP.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="#ADDBKP.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 3</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#ADDBKP.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, Positional 4</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#ADDBKP.SKIP"><b>SKIP</b></a></td>
|
|
<td valign="top">Skip value</td>
|
|
<td valign="top"><i>Integer</i>, <b><u>0</u></b></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="4"><a href="#ADDBKP.BKPCOND"><b>BKPCOND</b></a></td>
|
|
<td valign="top">Breakpoint condition</td>
|
|
<td valign="top">Single values: <b><u>*NONE</u></b><br>Other values: <i>Element list</i></td>
|
|
<td valign="top" rowspan="4">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 1: Variable</td>
|
|
<td valign="top">
|
|
*PGMVAR1, *PGMVAR2, *PGMVAR3, *PGMVAR4, *PGMVAR5, *PGMVAR6, *PGMVAR7, *PGMVAR8, *PGMVAR9, *PGMVAR10</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 2: Operator</td>
|
|
<td valign="top">
|
|
*EQ, *GT, *LT, *NE, *GE, *NL, *LE, *NG, *CT</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 3: Compare value or variable</td>
|
|
<td valign="top">
|
|
<i>Character value</i></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#ADDBKP.BKPPGM"><b>BKPPGM</b></a></td>
|
|
<td valign="top">Breakpoint program to call</td>
|
|
<td valign="top">Single values: <b><u>*NONE</u></b><br>Other values: <i>Qualified object name</i></td>
|
|
<td valign="top" rowspan="3">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Qualifier 1: Breakpoint program to call</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></table>
|
|
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#ADDBKP.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</div>
|
|
<div> <a name="ADDBKP.STMT"></a>
|
|
<h3>Statement identifier (STMT)</h3>
|
|
<p>Specifies the statement identifiers of one to ten statements or machine instructions in the program at which breakpoints are set. When run, the program breaks <b>before</b> processing a statement specified as a breakpoint.
|
|
</p>
|
|
<p>This is a required parameter.
|
|
</p>
|
|
<p>The list can contain a maximum of 10 identifiers (statement numbers, program labels, or machine instruction numbers) that are valid for the program specified by the PGM parameter. At least one identifier is needed. If a machine instruction number is specified, a slash must be placed in front of the number and both the slash and the number must be enclosed in apostrophes.
|
|
</p>
|
|
<p>In high-level language programs, different statements, different labels, or both can be mapped to the same internal instruction. This happens when there are several statements that do not operate on variables directly (such as DO, END, and comments) following one another in a program. To determine which statements can be mapped to the same instruction, the intermediate representation of a program listing can be used.
|
|
</p>
|
|
<p>Because different statements can be mapped to the same instruction, adding a breakpoint can redefine a previous breakpoint that was added for a different statement. When this occurs, the new breakpoint replaces the previously added breakpoint.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#ADDBKP.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="ADDBKP.PGMVAR"></a>
|
|
<h3>Program variables (PGMVAR)</h3>
|
|
<p>Specifies the names of up to ten program variables shown that are in a high-level language or machine instruction program. The name and the value of each program variable is shown when any of the breakpoints specified on the <b>Statement identifier (STMT)</b> parameter are reached. When run, the program stops <b>before</b> processing a statement specified as a breakpoint.
|
|
</p>
|
|
<p>
|
|
<b>Note: </b>In some high-level languages such as RPG, variables that are declared but not referred to in the program cannot be specified on the PGMVAR parameter.
|
|
</p>
|
|
<p><b>Single values</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NONE</u></b></dt>
|
|
<dd>No program variables are shown for any of the breakpoints specified.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Other values (up to 10 repetitions)</b>
|
|
</p>
|
|
<p><b>Element 1: Program variable</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b>*CHAR</b></dt>
|
|
<dd>This special value is specified instead of a variable name if a basing pointer is also specified. This special value displays 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 names of one to ten program variables, separated by blanks, shown when a breakpoint is reached. The name must be enclosed in apostrophes if it contains special characters.
|
|
<p>If the program variable is an array, the subscripts representing the element 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, embedded blanks, parentheses, and commas. It does not include the enclosing apostrophes when special characters are used. An integer, a 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. For more information on testing and debugging at machine interface level and on the program variable value, refer to the CL information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
<p><b>Element 2: Basing pointer variable</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>character-value</i></b></dt>
|
|
<dd>Specify up to five basing pointers for each program variable to be shown. 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 being 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 qualification, subscripts, embedded blanks, parentheses, and commas. It does not include the enclosing apostrophes when special characters are used. An integer, a machine-interface object-definition-table-vector (MI ODV) number, or a numeric variable name can be specified for a subscript.
|
|
</p>
|
|
<p>For more information, refer to "Parameter values used for testing and debugging" in "CL concepts and reference" in the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#ADDBKP.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="ADDBKP.OUTFMT"></a>
|
|
<h3>Output format (OUTFMT)</h3>
|
|
<p>Specifies the format used to show the variables.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*CHAR</u></b></dt>
|
|
<dd>Variables are shown in character form.
|
|
</dd>
|
|
<dt><b>*HEX</b></dt>
|
|
<dd>Variables are shown in hexadecimal form.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#ADDBKP.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="ADDBKP.PGM"></a>
|
|
<h3>Program (PGM)</h3>
|
|
<p>Specifies the program to which the breakpoints are added.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*DFTPGM</u></b></dt>
|
|
<dd>The breakpoints are added to the program currently specified as the default program in debug mode.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the program to which the breakpoints are added. The program must already be in debug mode.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#ADDBKP.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="ADDBKP.START"></a>
|
|
<h3>Char output start position (START)</h3>
|
|
<p>Specifies, for string variables only, the starting position in the string from which its value is shown when the breakpoint is reached. 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, and for a character string, the value specifies the starting character position.
|
|
</p>
|
|
<p>For conditional breakpoints, the <b>Char output start position (START)</b> parameter also specifies the starting point in the string where the comparison is made.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>1</u></b></dt>
|
|
<dd>The variable is shown from the first position onward through the length specified by the value supplied for the <b>Characters to display (LEN)</b> parameter.
|
|
</dd>
|
|
<dt><b><i>integer</i></b></dt>
|
|
<dd>Specify the first position of the program variable to be shown.
|
|
<p>The value supplied for the START 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.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#ADDBKP.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="ADDBKP.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 value supplied for the <b>Char output start position (START)</b> parameter. If more than one string variable is specified by the value supplied 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>
|
|
<p>For conditional breakpoints, the <b>Characters to display (LEN)</b> parameter also specifies the length of the string where the comparison is made.
|
|
</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 value supplied for the PGMVAR parameter.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#ADDBKP.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="ADDBKP.SKIP"></a>
|
|
<h3>Skip value (SKIP)</h3>
|
|
<p>Specifies the number of times the statement or statements on the <b>Statement identifier (STMT)</b> parameter must be processed before the program is stopped.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>0</u></b></dt>
|
|
<dd>The program stops immediately when the statement or statements are processed. No skipping of breakpoints is done.
|
|
</dd>
|
|
<dt><b><i>integer</i></b></dt>
|
|
<dd>Specify the number of times the statements must be processed before the program is stopped. If more than one statement is specified, each statement will have its own independent skip value. There is a separate skip count for each statement.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#ADDBKP.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="ADDBKP.BKPCOND"></a>
|
|
<h3>Breakpoint condition (BKPCOND)</h3>
|
|
<p>Specifies a condition, defined by an expression, that must be true before the program is stopped. The expression is tested before any statement on the <b>Statement identifier (STMT)</b> parameter is processed. If the expression is false, the breakpoint does not stop the program. If the expression is true, the program is stopped.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NONE</u></b></dt>
|
|
<dd>No breakpoint expression is specified.
|
|
</dd>
|
|
<dt><b><i>breakpoint-expression</i></b></dt>
|
|
<dd>Specify a breakpoint expression indicating a conditional breakpoint. A breakpoint expression consists of these three parts:
|
|
<ul>
|
|
<li>A variable (*PGMVAR1 to *PGMVAR10)
|
|
</li>
|
|
<li>An operator
|
|
</li>
|
|
<li>A compare value
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
<dt><b><i>variable</i></b></dt>
|
|
<dd>Specify the variable to be used in the breakpoint expression. For example, *PGMVAR1 indicates the first variable of the <b>Program variables (PGMVAR)</b> parameter, *PGMVAR2 indicates the second, and so on. Only numeric, character, or bit variables may be specified.
|
|
</dd>
|
|
<dt><b><i>operator</i></b></dt>
|
|
<dd>Specify what type of comparison is to be done for a conditional breakpoint. The following comparisons are allowed:
|
|
<dl>
|
|
<dt><b>*EQ</b></dt>
|
|
<dd>equal to
|
|
</dd>
|
|
<dt><b>*NE</b></dt>
|
|
<dd>not equal to
|
|
</dd>
|
|
<dt><b>*GT</b></dt>
|
|
<dd>greater than
|
|
</dd>
|
|
<dt><b>*LT</b></dt>
|
|
<dd>less than
|
|
</dd>
|
|
<dt><b>*GE</b></dt>
|
|
<dd>greater than or equal to
|
|
</dd>
|
|
<dt><b>*NL</b></dt>
|
|
<dd>not less than (same as *GE)
|
|
</dd>
|
|
<dt><b>*LE</b></dt>
|
|
<dd>less than or equal to
|
|
</dd>
|
|
<dt><b>*NG</b></dt>
|
|
<dd>not greater than (same as *LE)
|
|
</dd>
|
|
<dt><b>*CT</b></dt>
|
|
<dd>contains
|
|
</dd>
|
|
</dl>
|
|
<p>
|
|
<b>Note: </b>The *CT operator compares whether one character string contains one or more occurrences of another character string. This comparison is for an exact match, and it is case sensitive.
|
|
</p>
|
|
</dd>
|
|
<dt><b><i>compare-value</i></b></dt>
|
|
<dd>Specify a constant or another variable to compare with the first variable. If a constant is specified, it must be the same type as the variable. If the variable is numeric, the constant must be a number. If the variable is a bit, the constant must be a string containing only '1's and '0's. If the variable is a character, the compare value is treated as a character string, even if a number is specified.
|
|
<p>If another program variable is specified, it is compared with the first variable. The variables must be of the same type. If the variables are numeric, they must both be floating point or not floating point. For example, a packed number may not be compared with a floating point number.
|
|
</p>
|
|
<p>When comparing two non-floating point variables, or a non-floating point variable and a constant, the total number of digits needed to represent them must not exceed 31. For example, a PACKED(24,2) and a PACKED(24,20) cannot be compared. The first variable requires 22 digits to the left of the decimal point and two digits to the right. The second variable requires four digits to the left of the decimal and 20 digits to the right. To compare them requires a variable with 22 digits to the left of the decimal and 20 to the right. This exceeds the maximum number of allowed digits, 31.
|
|
</p>
|
|
<p>When comparing two character strings, the shorter of the two will be padded on the right with blanks. When comparing two bit strings, they must both be of the same length. The <b>Skip value (SKIP)</b> parameter and the <b>Breakpoint condition (BKPCOND)</b> parameter may be used together. In this case, the breakpoint expression is not evaluated until the breakpoint has skipped the number of times specified by SKIP. After that, the breakpoint expression is evaluated and the program stops if the expression is true.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#ADDBKP.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="ADDBKP.BKPPGM"></a>
|
|
<h3>Breakpoint program to call (BKPPGM)</h3>
|
|
<p>Specifies the name of the user-supplied program (if any) to call when a breakpoint is reached in the program specified by the <b>Program (PGM)</b> parameter. When the program specified by the BKPPGM parameter is called, it is passed four parameters that identify the program, the recursion level, the HLL statement identifier, and machine instruction number at which the breakpoint occurred. The parameters have the following format:
|
|
</p>
|
|
<ol>
|
|
<li>Program name (10 bytes). The name of the program in which the breakpoint was reached.
|
|
</li>
|
|
<li>Recursion level (5 bytes). The recursion level number of the program in which the breakpoint was reached. This value is a 1-digit to 5-digit number that is padded on the right with blanks.
|
|
</li>
|
|
<li>Statement identifier (10 bytes). The high-level language program statement identifier that was reached. This statement identifier is the statement identifier specified in the Add Breakpoint (ADDBKP) command that defined the breakpoint. If a machine instruction number was used to specify the breakpoint, this parameter contains a slash (/) followed by a 4-digit hexadecimal machine instruction number.
|
|
</li>
|
|
<li>Instruction number (5 bytes). The machine instruction number that corresponds to the high-level language statement at which the breakpoint was reached. No slash appears in front of this machine instruction number. It consists of 1 to 4 hexadecimal characters that represent the MI instruction number, followed by one or more blanks. If a machine instruction number is passed in the third parameter, the numbers in the third and fourth parameters are the same.
|
|
</li>
|
|
</ol>
|
|
<p>All the parameter values are left-adjusted and padded with blanks. When the called program returns, the program being debugged continues processing, starting with the statement that has the breakpoint on it.
|
|
</p>
|
|
<p><b>Single values</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NONE</u></b></dt>
|
|
<dd>No breakpoint-handling program is called when any breakpoint specified in this command is reached in the batch environment. The stopped program continues processing.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Qualifier 1: Breakpoint program to call</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the user-supplied program to be called if any of the breakpoints on this command are reached while debugging in a batch environment. The program specified here should not be the same as the program specified on the <b>Program (PGM)</b> parameter. If they are the same, the results are unpredictable. After the called program runs, it returns control to the stopped program, which continues processing.
|
|
</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 program. 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 program is located.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#ADDBKP.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="ADDBKP.COMMAND.EXAMPLES">Examples</a> </h3>
|
|
<p><b>Example 1: Adding Breakpoints in Debug Mode</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
ADDBKP STMT(150 RTN1 205) PGMVAR('&TEMP' '&INREC')
|
|
</pre>
|
|
</p>
|
|
<p>This command establishes breakpoints at CL statement numbers 150 and 205 and at the label RTN1 for the default program in debug mode. When any of these breakpoints is reached, the CL variables &TEMP and &INREC are automatically shown. Note that the CL variables must include a leading ampersand (&) and be specified within apostrophes.
|
|
</p>
|
|
<p><b>Example 2: Adding Breakpoints to HLL Program</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
ADDBKP STMT(100) PGMVAR('AMOUNT(200)') PGM(MYPROG)
|
|
</pre>
|
|
</p>
|
|
<p>Assume in this example that MYPROG is a high-level language program being debugged in an interactive environment and that the program variable AMOUNT is a 250-element array in MYPROG. This command adds a breakpoint to statement 100 in MYPROG. When MYPROG is started, the program stops processing at statement 100, and the value of the 200th element of the AMOUNT array is shown. If AMOUNT had been specified without a subscript, all of the array elements would have been shown.
|
|
</p>
|
|
<p><b>Example 3: Program Stops After Processing Statement 10 Times</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
ADDBKP STMT(10) SKIP(1000)
|
|
</pre>
|
|
</p>
|
|
<p>This command causes the default program to stop when statement 10 is processed 1000 times (the breakpoint is skipped 1000 times).
|
|
</p>
|
|
<p><b>Example 4: Program Stops After Processing Multiple Statements</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
ADDBKP STMT(10 20 30) SKIP(50)
|
|
</pre>
|
|
</p>
|
|
<p>This command causes the default program to stop when statements 10, 20, and 30 are processed 50 times.
|
|
</p>
|
|
<p><b>Example 5: Conditional Breakpoint</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
ADDBKP STMT(10) PGMVAR(X) BKPCOND(PGMVAR1 *EQ 5)
|
|
</pre>
|
|
</p>
|
|
<p>This command stops the default program at statement 10 when variable X is equal to five.
|
|
</p>
|
|
<p><b>Example 6: Conditional Breakpoint</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
ADDBKP STMT(20) PGMVAR((S1) (S2)) SKIP(100)
|
|
BKPCOND(*PGMVAR1 *CT *PGMVAR2)
|
|
</pre>
|
|
</p>
|
|
<p>This command stops after statement 20 has been processed 100 times, and then only if the character string S2 occurs in the character string S1.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#ADDBKP.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="ADDBKP.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="#ADDBKP.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|