DTRHELP.HLB  —  Value Expressions, Variables  Null Values and Variables
       DEC DATATRIEVE supports relational databases null values in
       variables. Therefore, DEC DATATRIEVE has the following behavior:

       o  When transferring a missing value from a DEC DATATRIEVE
          variable to a relational field, the field receives a null
          value.

          DTR> DECLARE VAR PIC X(10) MISSING VALUE "77".
          DTR> PRINT VAR

          VAR

          77

          DTR> STORE EMPLOYEE_MANAGER_TABLE USING EMP_ID = VAR
          DTR> PRINT EMPLOYEE_MANAGER_TABLE

           EMP_ID          MGR_ID

              NULL        NULL
          DTR>

       o  When transferring a null value from a relational field to a
          DEC DATATRIEVE variable, the variable receives either its
          missing value (if a MISSING VALUE clause is specified in the
          variable definition), or a null value (if the variable does
          not contain a MISSING VALUE clause).

          DTR> DECLARE EMPLOYEE PIC X(10) MISSING VALUE 8999.
          DTR> FOR X IN EMPLOYEE_MANAGER_TABLE
          CON> EMPLOYEE = EMP_ID
          DTR> PRINT EMPLOYEE

           EMPLOYEE

          8999
          DTR> DECLARE MANAGER PIC X(10).
          DTR> FOR X IN EMPLOYEE_MANAGER_TABLE
          CON> MANAGER = MGR_ID
          DTR> PRINT MANAGER

           MANAGER

          NULL
          DTR>
Close Help