Lists the names of variables, programs, or z/OS® Debugger procedures.
If LIST NAMES is issued with no keyword specified,
the names of all program and session variables that can be referenced
in the current programming language and that are visible to the currently
qualified block are displayed. A subset of the names can be specified
by supplying a pattern to be matched.

>>-LIST--NAMES--+---------+------------------------------------->
'-pattern-'
>--+-------------------------------------+--;------------------><
+-BLOCK--+-block_spec---------------+-+
| +-cu_spec------------------+ |
| | .-,--------------. | |
| | V | | |
| '-(----+-block_spec-+-+--)-' |
| '-cu_spec----' |
+-CUS---------------------------------+
+-LABELS------------------------------+
+-PROCEDURES--------------------------+
+-PROGRAMS----------------------------+
'-TEST--------------------------------'
- pattern
- The pattern searched for, conforming to the current programming
language syntax for a character string constant. The pattern length
cannot exceed 128 bytes, excluding the quotation marks (") or apostrophes
(').
If the DBCS setting is ON, the pattern can contain DBCS
characters. DBCS shift codes are not considered significant characters
in the pattern. Within the pattern, an SBCS or DBCS asterisk represents
a string of zero or more insignificant SBCS or DBCS characters. As
many as eight asterisks can be included in the pattern, but adjacent
asterisks are equivalent to a single asterisk.
Some examples
of possible strings follow:
| C |
Assembler, COBOL, and LangX COBOL |
PL⁄I |
| "ABC"
|
"A5"
|
'MY'
|
|
|
'A5'
|
|
Pattern matching is not case-sensitive outside of DBCS.
Both the pattern and potential names outside of shift codes are effectively
uppercased, except when the current programming language setting is
C. Letters in the pattern must be the correct case when the current
programming language setting is C.
- BLOCK
- Displays variable names that are defined within one or more specified
blocks.
- CUS
- Displays the compile unit names. CUS is equivalent
to PROGRAMS.
- LABELS
- Displays the names of all section and paragraph names
in a COBOL or LangX COBOL program, and the names of all instruction
labels in an assembler program. Supported only for COBOL and assembler.
- PROCEDURES
- Displays the z/OS Debugger procedure
names.
- PROGRAMS
- Is equivalent to CUS.
- TEST
- Displays the z/OS Debugger session
variable names.
Usage
notes
- For Enterprise COBOL for z/OS Version 5, the output of the command LIST
NAMES shows only level 0 and 77 data items and index names.
Subordinate data items within records are not displayed.
- For Enterprise COBOL for z/OS Version 5, when you issue LIST
NAMES CUS and a load module is linked with more than one
Enterprise COBOL for z/OS Version
5 compilation unit, the output includes all Enterprise COBOL for z/OS Version 5 compilation units
in the load module.
- For Enterprise COBOL for z/OS Version 5, when you issue the LIST
NAMES command for a program with nested programs, the output
for each block or nested program includes only the variables declared
in the block.
- For Enterprise COBOL for z/OS Version 5, when you issue the LIST
NAMES LABEL command for a program with nested blocks or programs,
only the labels in the current block are displayed.
- LIST NAMES CUS applies to compile unit names.
- LIST NAMES TEST shows only those session variable
names that can be referenced in the current programming language.
- The output of LIST NAMES without any options
depends on both the current qualification and the current programming
language setting. If the current programming language differs from
the programming language of the current qualification, the output
of the command shows only those session variable names that can be
referenced in the current programming language.
- For structures, the pattern is tested against the complete name,
hence "B" is not satisfied by "C OF B OF
A" (COBOL).
- If the DATA option of the PLAYBACK ENABLE command
is in effect for the current compile unit, you can use the LIST
NAMES command while you replay recorded statements by using
the PLAYBACK commands.
- For optimized COBOL programs, the LIST NAMES command
does not display variables discarded by the optimizer.
- For LangX COBOL, if you specify the EQALANGX file as
the source of debug information, when you enter the LIST NAMES
LABELS command, z/OS Debugger might
not display all of the labels because EQALANGX did not identify them
with the LABEL attribute.
Examples
- Display all compile unit names that begin with the letters "MY"
and end with "5". The current programming language setting is either
C or COBOL.
LIST NAMES "MY*5" PROGRAMS;
- Display the names of all the z/OS Debugger procedures
that can be called.
LIST NAMES PROCEDURES;
- Display the names of variables whose names begin with 'R' and
are in the mainprog block. The current programming
language setting is COBOL.
LIST NAMES 'R*' BLOCK (mainprog);
- Display all section and paragraph names that begin with
the letters "LAB". The currently qualified program is COBOL.
LIST NAMES "LAB*" LABELS;
Refer to the following topics
for more information related to the material discussed in this topic.