DTRHELP.HLB  —  Commands Statements Clauses, DECLARE Statement, Examples
       Declare the global variable NEW_BEAM as a 2-digit numeric field
       with a DEFAULT value of 10:

       DTR> DECLARE NEW_BEAM PIC 99 DEFAULT VALUE IS 10.
       DTR> PRINT NEW_BEAM

       NEW
       BEAM

        10

       DTR>

       Declare the global variable X as a single-precision floating-
       point number, with a MISSING VALUE of 36:

       DTR> DECLARE X REAL MISSING VALUE IS 36.
       DTR> PRINT X

           X

       36.0000000

       DTR> SHOW VARIABLES
       Global variables
          X    <Number>
          Declared as: X REAL MISSING VALUE IS 36.

       DTR> RELEASE X
       DTR> SHOW FIELDS
       No ready sources or global variables declared.
       DTR>

       Declare the variable DUE as a date. Assign today's date to DUE
       and suppress the header with a hyphen in parentheses:

       DTR> DECLARE DUE USAGE IS DATE.
       DTR> DUE = "TODAY"
       DTR> PRINT DUE (-)

       22-Sep-90

       DTR>
Close Help