C Copyright © Oracle Corporation 1995. All Rights Reserved. SUBROUTINE stats C--------------------------------------------- C This subroutine displays the total C number of records stored in the EMPLOYEES C relation. C--------------------------------------------- IMPLICIT NONE INTEGER number_employees CHARACTER confirm &RDB& DATABASE EXTERNAL pers = FILENAME 'MF_PERSONNEL' &RDB& DBKEY SCOPE IS FINISH WRITE (6,90) 90 FORMAT ('1',T25,'**** STATISTICS ****'///) C---------------------------------------------------- C Use the GET statement with a statistical function C to calculate the total number of records in the C EMPLOYEES relation. C---------------------------------------------------- &RDB& START_TRANSACTION READ_ONLY &RDB& GET &RDB& number_employees = COUNT OF E IN EMPLOYEES &RDB& END_GET C------------------------------------------ C Display the value. C------------------------------------------ TYPE 100, number_employees 100 FORMAT ('/',' Number of employees in the 1Corporation are: ',I5,/) &RDB& COMMIT PRINT *, ' ' TYPE 300 300 FORMAT ('$',' Press RETURN to continue') ACCEPT 400, confirm 400 FORMAT (A) RETURN END