VMS Help  —  RDML72  Statements  ROLLBACK  Examples  Pascal Example
    program rollback_trans (input,output);
    DATABASE PERS = FILENAME 'PERSONNEL';
    var sal_increase : [volatile] integer := 0;

    begin
    READY PERS;
    START_TRANSACTION (TRANSACTION_HANDLE SAL_INCREASE) READ_WRITE;

    STORE (TRANSACTION_HANDLE SAL_INCREASE) J IN JOBS USING
        J.JOB_CODE := 'TYPS';
        J.WAGE_CLASS := '1';
        J.JOB_TITLE := 'Typist';
        J.MINIMUM_SALARY := 10000;
        J.MAXIMUM_SALARY := 17000;
    END_STORE;

    ROLLBACK (TRANSACTION_HANDLE SAL_INCREASE);
    FINISH;
    end.
Close Help