HELPLIB.HLB  —  RDML72  Statements  MISSING
    Tests for the absence of a field value. A conditional expression
    that includes MISSING is true if the value specified by the
    dbfield-expression is missing. If you precede the MISSING
    expression with the optional NOT qualifier, the condition is
    true if the field contains a value.

1  –  Examples

    The following programs demonstrate the use of the MISSING and
    NOT MISSING conditional expressions. These programs form a record
    stream containing the records in the COLLEGES relation that have
    nothing stored in the field STATE, but do have a college code
    stored in the field COLLEGE_CODE. Each record in the COLLEGES
    relation is tested for the above condition; if a record meets the
    condition these programs print an informational message and the
    college code of the newest record added to the record stream.

1.1  –  C Example

    #include <stdio.h>
    DATABASE PERS = FILENAME "PERSONNEL";

    main()
    {
    READY PERS;
    START_TRANSACTION READ_WRITE;

    FOR C IN COLLEGES
       WITH C.STATE MISSING
       AND C.COLLEGE_CODE NOT MISSING;
          printf ("State Missing for COLLEGE:  %s\n", C.COLLEGE_CODE);
    END_FOR;

    COMMIT;
    FINISH;
    }

1.2  –  Pascal Example

    program missing (input,output);
    DATABASE PERS = FILENAME 'PERSONNEL';

    begin
    READY PERS;
    START_TRANSACTION READ_WRITE;

    FOR C IN COLLEGES
       WITH C.STATE MISSING
       AND C.COLLEGE_CODE NOT MISSING;
          writeln ('State Missing for COLLEGE:', C.COLLEGE_CODE);
    END_FOR;

    COMMIT;
    FINISH;
    end.

2  –  Format

  (B)0missing-cond-expr

    qqq> db-field-expr qqq>qqqqwqq>qqqqqqqwqq> MISSING qqq>
                               mqq> NOT qqj

2.1  –  Format arguments

    db-field-expr          A database field value expression. A field
                           name qualified with a context variable.
Close Help