LIST

This system command is used to display the source code of a single object or to list one or more objects which are contained in the current library.

Note:
This command is not executable in batch mode.

This document covers the following topics:

See also Listing Objects in Using Natural Studio, and the descriptions of the commands LIST XREF and LIST COUNT.


Syntax Overview

LIST

[object-type]   object-name
DIRECTORY [object-name]
VIEW [view-name]
RESOURCE [name]
ERROR [name]

object-type

*

CLASS

4
COPYCODE
DATA-AREAS
  GLOBAL
  LOCAL
  PARAMETER

DIALOG

3
7 (for function)
8 (for adapter)
MAP

PROCESSOR

CP
5
PROGRAM
ROUTINES
  HELPROUTINE  
 

SUBPROGRAM

N
  SUBROUTINE  
TEXT

object-name

In place of object-name, you may specify the name of an object (8 characters long at maximum). You may also specify asterisk notation (*), see the examples below.

Displaying an Individual Source

LIST If you enter only the LIST command itself, without any parameters, the contents of the source of the object currently selected will be listed.
LIST object-name If you enter a single object name with the LIST command, you need not specify the object-type.

If you specify an object-type, you must also specify an object-name.

In both cases, the object's source code will be listed.

LIST object-type object-name

Displaying a List of Objects

LIST object-name

To have all objects in the current library listed, except DDMs, you specify an asterisk (*) for the object-name, but no object-type.

To have all objects of a certain type listed, you specify a certain object-type and an asterisk (*) for the object-name.

If you wish a certain range of objects to be listed, you can use asterisk notation (*) for the object-name and/or wildcard notation (?).

LIST object-type object-name

Examples

  • List all objects in the current library, except DDMs:

    LIST *
  • List all subroutines in the current library:

    LIST S *
  • List all objects (of any type) whose names begin with SYS:

    LIST SYS*
  • List all maps whose names begin with SYS:

    LIST M SYS*
  • List directory information of object PRG01 in current library:

    LIST DIR PRG01
  • List all objects such as NATAL, NATURAL, NATvrAL (where vr represents the relevant product version):

    LIST N?T*AL

Displaying Directory Information

LIST DIRECTORY

Displays the directory information about the last active object currently in the source work area:

  • Source code:
    "Saved-on" date and time, library name, user ID, programming mode (reporting or structured), Natural version, code page information (if available), operating system, size, encoding.

  • Object code:
    "Cataloged-on" date and time, library name, user ID, programming mode, Natural version, code page information (if available), operating system/version, size, Endian mode.

Directory information on the saved source code cannot be always exact, because the source code can be edited with non-Natural editors which are not under the control of Natural.

LIST DIRECTORY object-name Displays the directory information about the specified object. If you use asterisk notation (*) for object-name, the directory information of the existing objects is displayed sequentially.

Note:
The code page information displayed shows the first 32 characters of the code page only.

Displaying Views

LIST VIEW Displays a list of all views (DDMs).
LIST VIEW view-name If you specify a single view name, the specified view will be displayed.

For the view-name, you can use asterisk notation to display a list of all views (*) or a certain range of views (for example: A*).

Displaying File Information of Resource Objects

LIST RESOURCE name Displays the file information about the specified resource object. For name, you may only use asterisk notation (*).

Example - Display the file information of all resource objects whose name starts with a W:

LIST RESOURCE W*

Displaying File Information of Error Message Containers

LIST ERROR name Displays the file information about the specified error message container NnnAPMSL.MSG, where nn is the language code. For name, you may only use asterisk notation (*).