LIST NAMES command

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.

Read syntax diagramSkip visual syntax diagram
>>-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

Examples

Refer to the following topics for more information related to the material discussed in this topic.