HELPLIB.HLB  —  RDML72  Statements  AVERAGE  Examples  C Example
    #include <stdio.h>
    DATABASE PERS = FILENAME "PERSONNEL";

    double mean;
    main()
    {
    READY PERS;
    START_TRANSACTION READ_ONLY;

    GET
     mean = AVERAGE CI.SALARY OF CI IN CURRENT_INFO
            WITH CI.SALARY > 50000.00;
    END_GET;

    COMMIT;

    printf ("Average is: %f\n",mean);

    FINISH;
    }
Close Help