SHOW

SHOW

Top  Previous  Next

 

The SHOW command provides an interactive means of building select lists.

 

 

Format

 

SHOW {DICT} file.name

{USING {DICT} file.name}

{field.name {field.qualifier} ...}

{selection.clause}

{sort.clause}

{display.clause}

{record.id...}

{FROM select.list.no}

{TO select.list.no}

 

The SHOW command supports two special options that limit the number of selected items:

 

MAX nspecifies the maximum number of items that may be selected for the returned list.

 

MIN nspecifies the minimum number of items that may be selected for the returned list. Returning no items is always valid regardless of the value of n.

 

Also, use of the SORT.SUP keyword suppresses the default sort by record id when no sort clause is present. This is useful if a sorted select list is being used to control the records to be processed.

 

 

Examples

 

SHOW BP

 

Displays a list of records in the BP file from which items may be chosen to build a select list.

 

 

SHOW CLIENTS COMPANY EVAL "BALANCE - CREDIT" ID.SUP WITH BALANCE > CREDIT

 

For each client in the CLIENTS file with an outstanding balance greater then their credit limit, display the company name and the calculated amount by which the client has exceeded their credit limit. Display of the CLIENTS file record id is suppressed. The result of the SHOW operation becomes the default select list (list 0).

 

 

SHOW STOCK QTY REORDER.LEVEL TO 3

 

Displays the id, quantity and reorder level fields of each item in the STOCK file. The result of the SHOW operation is saved in select list 3.

 

 

SHOW CLIENTS COMPANY FMT "30T" LAST.CALL CONV "D2/"

 

Shows a list of CLIENTS file ids, the company name formatted to fit a 30 character wide field and the date on which the client was last called using the D2/ conversion for this date.

 

 

Using the SHOW Command

 

The SHOW command displays a list of records from the file being processed. This display consists of

 

A page heading which may be omitted using the HDR.SUP keyword. A default page heading is used unless specifically set by use of the HEADING keyword. The SHOW command does not support use of embedded control codes in page headings.

 

Column headings which may be omitted using the COL.SUP keyword. The heading is taken from the display name field of the dictionary entry for the item in the column. If blank, the field name is used.

 

Data from records being processed. The items displayed are the record id (unless the ID.SUP keyword has been used) and other fields named on the command line.

 

If the total width of the named fields exceeds the available space, SHOW will drop trailing fields until the data fits the display width or only one (plus the record id, if not suppressed) remains. If the data still does not fit after dropping fields, the remaining fields are displayed in reduced space.

 

The SHOW command splits multivalued items onto successive lines and correctly relates values and subvalues in associated fields. A record is never split between two pages, a new page being started if necessary. If a single record requires more lines than will fit on a screen page, it is truncated.

 

Each item on the page is numbered for reference in the commands that manipulate the list. The number starts at one for the first item on each page.

 

A status line showing the number of selected records.

 

An input line on which commands are entered.

 

An error line on which error messages and help text appears.

 

 

Using the commands listed below, the user can scroll through the displayed records setting or clearing a marker (displayed as an asterisk next to the record number) which indicates whether the record is to be included in the generated select list.

 

TMove to the top of the list (first page).

 

BMove to the bottom of the list (last page).

 

NMove to the next page. The return key with no command text has the same effect.

 

PMove to the previous page.

 

QQuit from record selection. Any records marked with an asterisk are entered into the new select list.

 

QCQuit, clearing any record selection.

 

RRedisplay the screen. This is useful if a data transmission error causes screen corruption.

 

^^Synonym for R.

 

?Display help text. Press any key to return to the main screen.

 

S itemSelect item. The space before the item description is optional. An asterisk will be displayed next to all selected items.

 

C itemClear item, removing the asterisk marker from the screen.

 

itemSynonym for S item.

 

The item specification may be

 

The number shown next to a displayed record.

 

A range of numbers in the form a-b which indicates that the command is to be applied to all items from that tagged with number a to that tagged with number b. There must be no spaces either side of the hyphen.

 

The keyword VISIBLE to apply the command to all items on the current page.

 

The keyword ALL to apply the command to all items in the list.

 

Multiple item specifications may be included in a single command by using either a space or a comma as a separator. For example "1,4,8-11".

 

The VISIBLE and ALL keywords may be abbreviated by omitting any number of trailing letters (e.g. VIS or V).