DECLARE command (PL/I)
The DECLARE command declares session variables
that are effective during a z/OS® Debugger session.
Variables declared this way can be used in other z/OS Debugger commands
as if they were declared to the compiler. They are removed with the CLEAR command
or when your z/OS Debugger session
ends. The keywords cannot be abbreviated.
- level
- An unsigned positive integer. Level 1 must be specified for major structure names.
- name
- A valid PL/I identifier. The name must be unique within a particular
structure level. When name conflicts occur, z/OS Debugger uses session variables before using other variables of the same name that appear in the running programs. Use qualification to refer to the program variable during a z/OS Debugger session. For example, to display the variable
adeclared with theDECLAREcommand as well as the variableain the program, issue theLISTcommand as follows:LIST (a, %BLOCK:a);If a name conflict occurs because the variable was declared earlier with a
DECLAREcommand, the new declaration overrides the previous one. - attribute
- A PL/I data or storage attribute. Acceptable PL/I data attributes include:
BINARY CPLX FIXED LABEL PTR BIT DECIMAL FLOAT OFFSET REAL CHARACTERS EVENT GRAPHIC POINTER VARYING COMPLEXAcceptable PL/I storage attributes include:BASED ALIGNED UNALIGNEDPointers cannot be specified with the
BASEDoption.Only simple factoring of attributes is allowed.DECLAREs such as the following are not allowed:DCL (a(2), b) PTR; DCL (x REAL, y CPLX) FIXED BIN(31);Also, the precision attribute and scale factor as well as the bounds of a dimension can be specified. If a session variable has dimensions and bounds, these must be declared following PL/I language rules.
Usage notes
DECLAREis not valid as a subcommand. That is, it cannot be used as part of aDO/ENDorBEGIN/ENDblock.- Initialization is not supported.
- Program
DEFAULTstatements do not affect theDECLAREcommand. - If you are debugging a Enterprise PL/I program, you cannot declare arrays, structures, factor attributes, or multiple session variables in one command line.
- The
DECLAREcommand cannot be used while you replay recorded statements by using thePLAYBACKcommands.
- Declare
x,y, andzas variables that can be used as pointers.DECLARE (x, y, z) POINTER; - Declare
aas a variable that can represent binary, fixed-point data items of 15 bits.DECLARE a FIXED BIN(15); - Declare
d03as a variable that can represent binary, floating-point, complex data items.
ThisDECLARE d03 FLOAT BIN COMPLEX;d03will have the attribute ofFLOAT BINARY(21). - Declare
xas a pointer, andsetxas a major structure with structure elementsaandbas fixed-point data items.
ThisDECLARE x POINTER, 1 setx, 2 a FIXED, 2 b FIXED;aandbwill have the attributes ofFIXED DECIMAL(5).
Refer to the following topics for more information related to the material discussed in this topic.
- Related tasks
- IBM® z/OS Debugger User's Guide
Refer to the following topics for more information related to the material discussed in this topic.
- Related references
- Enterprise PL/I for z/OS Language Reference
