Lists data from the database.


LIST [ num] [ setspec] [EVALUATE clause] [FORMAT «expression» [HEADING «expression»]] [-> clause]



The number of records to be listed. Num can be
an integer constant (e.g., 15, 200);
a variable, form field, menu item, or formal parameter that evaluates to an integer;
the word ALL.
If num is less than zero, or omitted, num defaults to 1.


A set specification whose members are to be listed. If setspec is omitted, the current set (if available) is used.


Any expression. Enclose complex expressions in parentheses.


A character string or an expression that evaluates to a character string.


The LIST command outputs num members of source to the current output device (usually the terminal).

By default, each column has a heading consisting of the field name. Headings can be suppressed using the SET HEADINGS command.

The width of each column is determined by these rules:

The HEADING option, always used in conjunction with FORMAT, establishes the heading that will be displayed above the corresponding expression, in place of any other heading that ZIM otherwise would be displaying. This option particularly useful whenever the expression is not a single field, thus normally not displaying any headings.

Output is also controlled by the SET PAGESIZE, SET PAGEWIDTH, and SET PAUSE commands.


list all Employees format LName FName (($date - BirthDate)/365)

The complex expression is enclosed in parentheses.

list all Employees format LName heading "LastName" FName(($date-BirthDate)/365) heading "Age of Employee"

It will list three fields whose headings are: "Last Name", "FName" and "Age of Employee".


The current member of the current set is listed.

list all format $count("") LName FName Age

All members of the current set are listed with sequence numbers.


Related Topics