DISPLAY command

Displays information about the specified Analytics item type. Can also display the result of an expression, or the output of a function.

Syntax and parameters

Syntax

Purpose

DISPLAY

Displays the field definitions, and any related child tables, for the currently active Analytics table.

DISPLAY OPEN

Displays a list of open Analytics tables and project files.

  • Analytics tables displays the name of the source data file, not the table layout name.

  • multiple-table mode the source data file identified as PRIMARY is associated with the currently active table.

  • related tables if the parent table is open, displays the source data file for both the parent and the child tables, even if the child table is not open in the View tab.

DISPLAY {<PRIMARY>|SECONDARY}

Displays the name and table layout information for the primary or secondary table.

  • PRIMARY (or no keyword specified) display information for the currently active table.
  • SECONDARY display information for the secondary table.

    In multiple-table mode, SECONDARY refers to the secondary table associated with the currently active table.

The information displayed includes:

  • the table layout name
  • the source data file name
  • any relations between the table and other tables
  • the field definition information from the table layout
DISPLAY HISTORY

Displays the table history for the currently active Analytics table.

Note

A table may or may not have associated table history.

DISPLAY RELATION

Displays relation information for the currently active Analytics table:

  • the names of any child tables
  • key field names
  • index names
DISPLAY {variable_name|VARIABLES}

Displays the value of a single variable or all variables.

  • variable_name the name of a single variable to display the value of.
  • VARIABLES display the values of all system and user-defined variables, and the remaining memory available to store variables.
DISPLAY VERSION

Displays information in the following format about the installed version of Analytics:

  • Version major version number.minor version number
  • Patch patch number
  • Type 000 (non-Unicode), or 001 (Unicode) edition of Analytics
  • Build software build number
DISPLAY {DATE|TIME}

Displays the current operating system date and time.

DATE | TIME specify either keyword. The two keywords do the same thing.

DISPLAY {FREE|SPACE}

Displays the amount of physical memory (RAM) available for use by Analytics.

The amount displayed does not include memory reserved for variables. By default, Analytics reserves 60 KB of physical memory to store variables, but the amount is automatically increased as necessary.

FREE | SPACE specify either keyword. The two keywords do the same thing.

DISPLAY expression

Displays the result of an expression.

expression the expression to display the result of.

DISPLAY function

Displays the output of a function.

function the function to display the output of.

Examples

Display the layout of an Analytics table

Displaying the layout of a table can be useful in a number of circumstances. For example, you may want to combine two or more tables, and you need to examine field lengths and data types.

The example below displays the layout of the Ap_Trans table:

OPEN Ap_Trans
DISPLAY

The DISPLAY command produces the output to screen shown below.

Note

If you enter DISPLAY directly in the Analytics command line, the output appears immediately.

If you run DISPLAY in a script, double-click the corresponding DISPLAY entry in the command log to display the output.

Output to screen

Relationship

'Vendor' related by 'Vendor_No' using index 'Vendor_on_Vendor_No'

File

'Ap_Trans.fil' (format 'Ap_Trans') is your PRIMARY file.

The record length is 59

Fields

Name Type Start Length Decimals Field explanation
Vendor_No ASCII 1 5   AS "Vendor;Number" WIDTH 7
Invoice_No ASCII 6 15   AS "Invoice;Number"
Invoice_Date DATETIME 21 8   PICTURE "MM/DD/YY" AS "Invoice;Date" WIDTH 8
Invoice_Amount NUMERIC 29 12 2 PICTURE "(9,999,999.99)" AS "Invoice;Amount" WIDTH 12
Prodno ASCII 41 9   AS "Product;Number"
Quantity MICRO 50 4 0 PICTURE "(9,999,999)"
Unit_Cost NUMERIC 54 6 2 PICTURE "(9,999,999)" AS "Unit;Cost" SUPPRESS

Display the values of all variables in an Analytics project

DISPLAY VARIABLES generates the same information that appears in the Variables tab in the Navigator. One benefit of using DISPLAY VARIABLES is that you can copy-and-paste the displayed information.

The example below creates two user-defined variables and two system variables and then displays the values of the variables:

ASSIGN v_table_name = "Ap_Trans"
ASSIGN v_field_name = "Invoice_Amount"
OPEN %v_table_name%
TOTAL FIELDS %v_field_name%
DISPLAY VARIABLES

The DISPLAY command produces the output to screen shown below.

Note

If you enter DISPLAY VARIABLES directly in the Analytics command line, the output appears immediately.

If you run DISPLAY VARIABLES in a script, double-click the corresponding DISPLAY VARIABLES entry in the command log to display the output.

Output to screen

Name Type Value
TOTAL1 N 278,641.33
OUTPUTFOLDER C "/Tables/Accounts_Payable"
v_field_name C "Invoice_Amount"
v_table_name C "Ap_Trans"

Display the result of an expression

For the selected record, the example below displays the result of multiplying the value in the Sale_Price field by the value in the Quantity_on_Hand field:

DISPLAY Sale_Price * Quantity_on_Hand

Display the output of a function

For the selected record, the example below displays the number of days that have elapsed since the date in the Invoice_Date field:

DISPLAY AGE(Invoice_Date)

Remarks

Location of command results

DISPLAY run from the Analytics command line the results are displayed on screen.

DISPLAY executed in a script the results are written to the Analytics command log. You can double-click the command log entry to display the results on screen.