Difference between revisions of "DISPLAY"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
''[[DISPLAY Commands|DISPLAY ... commands]]''
 +
 
==Purpose==
 
==Purpose==
 
Display the contents of the active table and any related tables
 
Display the contents of the active table and any related tables
 
  
 
==Syntax==
 
==Syntax==
Line 14: Line 15:
 
[OFF]
 
[OFF]
  
[TO FILE <.txt filename> | (<expC>)] | [TO PRINT]
+
[TO FILE <.txt filename> | (<expC>)]  
  
 
[WHILE <condition>]
 
[WHILE <condition>]
 
  
 
==See Also==
 
==See Also==
[[DB_PRINT]], [[DIR]], [[Display and List]], [[DISPLAY MEMORY]], [[DISPLAY STATUS]], [[DISPLAY STRUCTURE]], [[Function Keys]], [[LIST]], [[SCOPE]], [[SET FILTER]], [[SET HEADING]], [[SET PAGELENGTH]], [[SET PAGEWIDTH]], [[SET PRINTER]], [[SET RELATION]], [[USE]]
+
[[DIR]], [[Display and List]], [[DISPLAY MEMORY]], [[DISPLAY STATUS]], [[DISPLAY STRUCTURE]], [[LIST]], [[SCOPE]], [[SET FILTER]], [[SET RELATION]], [[USE]]
 
+
  
 
==Description==
 
==Description==
The DISPLAY command is a general purpose Recital query command that retrieves and displays the contents of table files on the screen. The DISPLAY command pauses every screen until a key is pressed to continue displaying, or the [ABANDON] key to cancel.  When displaying a record that is longer than the screen width, the contents to the right of the display normally will not be displayed unless you have set your terminal to wrap.  Consult the relevant manual for your terminal regarding this feature.  Where the output is sent to a file or printer, the pause is disabled.
+
The DISPLAY command is a general purpose Lianja query command that retrieves and displays the contents of table files. The expressions that you specify can be any valid Lianja expression, including the use of alias pointers into other workareas.  If you have SET RELATION TO another table, for each record that is read from the active table, the related table will have its record pointer positioned, and the appropriate record read into its workarea.
 
+
DISPLAY is more powerful than it looks initially.  The expressions that you specify can be any valid Recital expression, including the use of alias pointers into other workareas.  If you have SET RELATION TO another table, for each record that is read from the active table, the related table will have its record pointer positioned, and the appropriate record read into its workarea.
+
 
+
If SET FILTER TO <condition> is in effect, only those records that satisfy the filter <condition> will be displayed.  If SET DESCRIPTIONS and SET HEADING are ON and the FIELDS clause is specified, the table field descriptions will be used as the headings to each of the display columns, rather than the field names.  The command SET HEADING TO SINGLE | DOUBLE | NONE controls the underlining of the column headings.
+
  
 +
If SET FILTER TO <condition> is in effect, only those records that satisfy the filter <condition> will be displayed.
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
!Keyword||Description
+
!width="35%"|Keyword||Description
 
|-
 
|-
|<scope>||If the [[SCOPE]] is not specified, only the current record will be displayed, unless the WHILE clause is used, in which case it will default to REST.
+
|valign="top"|<scope>||If the [[SCOPE]] is not specified, only the current record will be displayed, unless the WHILE clause is used, in which case it will default to REST.
 
|-
 
|-
|FOR <condition>||Only those records that satisfy the <condition> are displayed.
+
|valign="top"|FOR <condition>||Only those records that satisfy the <condition> are displayed.
 
|-
 
|-
|OFF||Disables the display of the record number in the first column of the results.
+
|valign="top"|OFF||Disables the display of the record number in the first column of the results.
 
|-
 
|-
|FIELDS <exp list>||Restricts the fields displayed to those specified.
+
|valign="top"|FIELDS <exp list>||Restricts the fields displayed to those specified.
 
|-
 
|-
|HEADING||A heading corresponding to either the field names or the expression will be displayed above each column even if SET HEADING is OFF.
+
|valign="top"|HEADING||A heading corresponding to either the field names or the expression will be displayed above each column even if SET HEADING is OFF.
 
|-
 
|-
|TO <file>||The display output will be sent to the specified file.  The filename can be substituted with a <expC>, enclosed in round brackets, which returns a valid filename.  If no file extension is specified, then ".txt" will be used.  The command SET PAGELENGTH governs the output file pagination and SET PAGEWIDTH defines the width of each page.  Page numbers are centered on the bottom of the page according to width.
+
|valign="top"|TO <file>||The display output will be sent to the specified file.  The filename can be substituted with a <expC>, enclosed in round brackets, which returns a valid filename.  If no file extension is specified, then ".txt" will be used.  
 
|-
 
|-
|TO PRINT||The display output will be sent to a printer.  The TO PRINT option will default to a local printer unless the command SET PRINTER TO \\SPOOLER is issued.  The print request will then be spooled to the system printer, which is defined by the environment variable DB_PRINT.
+
|valign="top"|WHILE <condition>||The [[SCOPE]] defaults to REST and records are displayed until the <condition> becomes false.
|-
+
|WHILE <condition>||The [[SCOPE]] defaults to REST and records are displayed until the <condition> becomes false.
+
 
|-
 
|-
 
|}
 
|}
 
  
 
==Example==
 
==Example==
Line 64: Line 57:
  
  
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
[[Category:Table Basics]]
+
[[Category:NoSQL Commands]]
[[Category:Table Basics Commands]]
+

Latest revision as of 09:59, 3 August 2016

DISPLAY ... commands

Purpose

Display the contents of the active table and any related tables

Syntax

DISPLAY [<scope>]

[FIELDS <field list>|<exp list>]

[FOR <condition>]

[HEADING]

[OFF]

[TO FILE <.txt filename> | (<expC>)]

[WHILE <condition>]

See Also

DIR, Display and List, DISPLAY MEMORY, DISPLAY STATUS, DISPLAY STRUCTURE, LIST, SCOPE, SET FILTER, SET RELATION, USE

Description

The DISPLAY command is a general purpose Lianja query command that retrieves and displays the contents of table files. The expressions that you specify can be any valid Lianja expression, including the use of alias pointers into other workareas. If you have SET RELATION TO another table, for each record that is read from the active table, the related table will have its record pointer positioned, and the appropriate record read into its workarea.

If SET FILTER TO <condition> is in effect, only those records that satisfy the filter <condition> will be displayed.

Keyword Description
<scope> If the SCOPE is not specified, only the current record will be displayed, unless the WHILE clause is used, in which case it will default to REST.
FOR <condition> Only those records that satisfy the <condition> are displayed.
OFF Disables the display of the record number in the first column of the results.
FIELDS <exp list> Restricts the fields displayed to those specified.
HEADING A heading corresponding to either the field names or the expression will be displayed above each column even if SET HEADING is OFF.
TO <file> The display output will be sent to the specified file. The filename can be substituted with a <expC>, enclosed in round brackets, which returns a valid filename. If no file extension is specified, then ".txt" will be used.
WHILE <condition> The SCOPE defaults to REST and records are displayed until the <condition> becomes false.

Example

open database southwind
use products order categoryid
display
display all
seek 2
display productid, productname while categoryid = 2