Displays the value of a single DEC DATATRIEVE value expression.
The value displayed is not formatted by any edit string
associated with the value expression.
Format
DISPLAY value-expression
1 – Argument
value-expression
Is a DEC DATATRIEVE value expression.
2 – Examples
The following example shows how to declare a numeric variable
with a money edit string, give it a value, and use both the PRINT
statement and the DISPLAY statement to display that value:
DTR> DECLARE SALARY PIC Z(5)9V99 EDIT_STRING $$$$$$.99.
DTR> SALARY = 15753.67
DTR> PRINT SALARY
SALARY
$15753.67
DTR> DISPLAY SALARY
DISPLAY: 15753.67
DTR>
The following example redeclares the above variable as a
character variable, assigns a new value, and displays that value:
DTR> DECLARE SALARY PIC X(15).
DTR> SALARY = "MUCH TOO LOW"
DTR> PRINT SALARY
SALARY
MUCH TOO LOW
DTR> DISPLAY SALARY
DISPLAY: MUCH TOO LOW
The following example displays the group fields TYPE and SPECS
from the domain YACHTS:
DTR> READY YACHTS
DTR> FIND FIRST 1 YACHTS
[1 Record found]
DTR> SELECT; PRINT
LENGTH
OVER
MANUFACTURER MODEL RIG ALL WEIGHT BEAM PRICE
ALBERG 37 MK II KETCH 37 20,000 12 $36,951
DTR> DISPLAY TYPE
DISPLAY: ALBERG 37 MK II
DTR> DISPLAY SPECS
DISPLAY: KETCH 37 200001236951
DTR>