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

    var
       DECLARE_VARIABLE badge SAME AS EMPLOYEES.EMPLOYEE_ID;

    begin
    write  ('Employee ID: ');
    readln (badge);

    READY PERS;
    START_TRANSACTION READ_WRITE;

    FOR E IN EMPLOYEES WITH E.EMPLOYEE_ID = badge
       MODIFY E USING
          E.STATUS_CODE := '1';
       END_MODIFY;
    END_FOR;

    ROLLBACK;
    FINISH;
    end.
Close Help