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

    var
    DECLARE_VARIABLE latest_degree SAME AS DEGREES.YEAR_GIVEN;

    begin
    READY PERS;
    START_TRANSACTION READ_ONLY;

    GET
     latest_degree = MAX D.YEAR_GIVEN OF D IN DEGREES;
    END_GET;

    writeln ('Latest Degree was awarded in: ', latest_degree);

    COMMIT;
    FINISH;
    end.
Close Help