You are here: Commands > List

List

Use the List command to display selected output data in a columnar list format. For example, you can use List to review the detailed contents of a table.

This command can be issued only in command mode. For more information, see Groups.

This command allows you to select information from the table and print it to the screen, send it directly to a printer or save it to a text file. Unless otherwise specified, output is sent only to the screen.

You can include the optional Line parameter to create multi-line listings.

Page numbers, date, time, user identification and column headings are provided automatically. Numeric columns are also automatically totalled. You can specify multi-line, as well as centered headers and footers using the Header and Footer parameters.

Because column headings are determined by the first line of fields, make sure you specify appropriate headings on the first line. Use the appropriate WIDTH modifier to control horizontal positioning on each line and ensure fields are aligned vertically the way you want them.

Note: Arranging a View is a more powerful way of listing and reviewing table data.

See Displaying a View for details.

Parameters

In addition to the command parameters described below, the List command has the following command parameters: To. For a description of these parameters, see Command Parameters. For a description of supported field modifiers see Field Modifiers.

Header

Header inserts text at the top of each page. This overrides any value set by a header variable.

Footer

Footer inserts text at the bottom of each page. This overrides any value set by a footer variable.

Fields

Indicates that the fields following this keyword are to be included in the list on line one.

Line

Specifies additional output lines.

For multi-line reports, column headings are determined by line 1. Headings for other lines will not be output. If necessary, adjust the headings on line 1 to reflect the information on the other lines.

Skip

Causes Analyzer to insert the specified number of blank lines between each record in the list. For example, LIST ALL SKIP 1 produces a double spaced list (one blank line between each record).

Note: When creating a multi-line report, you may find using field modifiers such as Width and As, useful for aligning columns or adjusting headings.

See Field Modifiers for details.

Unformatted

Suppresses the special list pagination features and the space between fields (undelimited SDF format). It creates output identical to that created by the Export ASCII command. Use it with the “TO text-file-name” parameter to produce output that can be further processed by other software programs.

Command Mode Syntax

LIST {<FIELDS> list-fields|ALL} <TO text-file-name>

LINE n list-fields

<UNFORMATTED>

<IF test> <WHILE test> <FIRST|NEXT range>

<HEADER header>

<FOOTER footer>

<SKIP n>

<EOF>

<APPEND>¿

list-fields specifies the fields to be listed. Any field or expression may be used. Enter ALL to list every defined field. When used with the LINE parameter, list-fields specifies the fields or expressions to be listed on that line.
Line n can be a value between 2 and 60.

Examples

You can use List in an inventory file to list the fields product number, product description, quantity on hand, unit cost and recorded value for records with a negative unit cost or quantity on hand. You can also add a descriptive header to the list.

Enter the following into the Command Log text box:

LIST PRODNO PRODDESC QTYOH UNCST VALUE IF QTYOH < 0 OR UNCST < 0 HEADER ‘NEGATIVE VALUES’

The result of the List command appears in the Command Log.

Analyzer informs you that only five records meet the test. These are unusual items and warrant further investigation.