This section contains expanded descriptions of the program variable, basing pointer, subscript, and qualified-name parameter values. These values can be specified on the Add Breakpoint (ADDBKP), Add Trace (ADDTRC), Change High-Level Language Pointer (CHGHLLPTR), Change Program Variable (CHGPGMVAR), and Display Program Variable (DSPPGMVAR) commands.
For expanded descriptions, see the following:
Program Variable .-------------------. V (1) | >>-qualified-name---subscript------,subscript-------+----------><
Note:
The program variable must be enclosed in apostrophes if it contains special characters. Up to 132 characters can be specified for a program variable name. This includes any subscripts, embedded blanks, parentheses, and commas. It does not include the enclosing apostrophes when special characters are used. Some examples are:
COUNTA 'VAR1(2,3)' 'A.VAR1(I,3,A.J,1)' 'VAR1 OF A(I,3,J OF A)' '&LIBNAME'
Basing Pointer .-------------------. V (1) | >>-qualified-name---subscript------,subscript-------+----------><
Note:
The basing pointer must be enclosed in apostrophes if it contains special characters. Up to 132 characters can be specified for a basing pointer name. This includes any subscripts, embedded blanks, parentheses, and commas. It does not include the enclosing apostrophes when special characters are used. Some examples are:
PTRVAR1 'ABC.PGMPTR(5,B.I)'
If more than one basing pointer is specified for a variable, the list of basing pointers must be enclosed in parentheses. When multiple basing pointers are specified, they must be listed in order, from the first basing pointer to the last, when used to locate the variable. In the example below, the PTR_1 basing pointer is the first basing pointer used to locate the variable; it either must have a declared basing pointer, or it must not be a based variable. The address contained in the PTR_1 pointer is used to locate the A.PTR_2 pointer (which must be declared as a based pointer variable). The contents of the A.PTR_2 pointer are used to locate the PTR_3 pointer array (which must also be declared based), and the contents of the specified element in the last pointer array are used to locate the variable. An example is:
('PTR_1' 'A.PTR_2' 'PTR_3(1,B.J)')
Subscript .-integer-number--. >>-+-qualified-name--+----------------------------------------->< '-*---------------'
An integer number contains from 1 through 15 digits with an optional leading sign (either plus or minus). A decimal point is not allowed in an integer-number subscript. If a decimal point is specified, the subscript value is not interpreted as the correct numeric value by the system, and an error message is returned.
An asterisk (*) can be used to request a single-dimensional cross-section display of an array program variable. An asterisk can only be specified for a subscript on the primary variable (not on a basing pointer) for the PGMVAR keyword on the Add Break Point (ADDBKP), Add Trace (ADDTRC), and Display Program Variable (DSPPGMVAR) commands. In addition, if the variable has multiple dimensions, only one of the subscript values can be an asterisk. An example of a request to display an array cross-section is:
DSPPGMVAR PGMVAR('X1(*,5,4)')
This display shows the values of all elements of the array that have the second subscript equal to five, and the third subscript equal to four.
Qualified-Name >>--+-/ODV-number------------------------------+--------------->< | .------------------------. | | V (1) | | '-variable-+----+-OF-+--variable-------+-+-' | '-IN-' | | .---------------. | | V (1) | | '---variable-------+----------'
Note:
Some high-level languages may allow you to declare more than one variable with the same fully qualified name (although you generally are not able to refer to these variables in the high-level language program after they are declared). If you attempt to refer to such a variable using an OS/400(R) test facility command, the system selects one of the variables and uses it for the operation. No error is reported when a duplicate fully qualified name is selected.
Rules for qualified name description
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.