VMS Help  —  RDML72  Statements  MATCHING  Examples  Pascal Example
    program matching (input,output);
    DATABASE PERS = FILENAME 'PERSONNEL';

    var
      match_string: VARYING [10] OF CHAR;
    begin

    match_string := 'R*';

    READY PERS;
    START_TRANSACTION READ_ONLY;

    FOR E IN EMPLOYEES
       WITH E.LAST_NAME MATCHING match_string
       SORTED BY E.EMPLOYEE_ID
          writeln (E.EMPLOYEE_ID,'     ', E.LAST_NAME, E.FIRST_NAME);
    END_FOR;

    COMMIT;
    FINISH;
    end.
Close Help