C Copyright © Oracle Corporation 1995. All Rights Reserved. PROGRAM menu C------------------------------------------------------------------------ C This is the main program that calls all the sample FORTRAN subroutines. C It allows you to perform any of several actions on the database. C C To create an executable, enter the following commands: C C $ rfor :== $rdbpre/fortran C $ rfor f_sample C $ rfor f_add_employees C $ rfor f_modify_address C $ rfor f_delete_record C $ rfor f_list_record C $ rfor f_seniority C $ rfor f_pair C $ rfor f_stats C $ rfor f_store_cand C $ rfor f_display_cand C $ rfor f_find_missing C $ rfor f_rdbdollarmissing C $ rfor f_mod_resume C $ rfor f_call_other C $ rfor f_display_resume C $ rfor f_error_handler C $ rfor f_store_resume C $ fort f_ddl_stmnt C $ fort f_callable C $ fort f_callable_error_handler C C $ link f_sample, f_add_employees, f_modify_address, - C f_delete_record, f_list_record, f_seniority, f_pair, - C f_stats, f_store_cand, f_display_cand, f_find_missing, - C f_rdbdollarmissing, f_mod_resume, f_call_other, - C f_display_resume, f_error_handler, f_store_resume, - C f_ddl_stmnt, f_callable, f_callable_error_handler C C $ run f_sample C C------------------------------------------------------------------------ CHARACTER*2 option LOGICAL no_more_responses &RDB& DATABASE GLOBAL pers = FILENAME 'MF_PERSONNEL' 1DBKEY SCOPE IS FINISH no_more_responses = .FALSE. C------------------------------------------------------ C Loop directs program to call appropriate C subroutines based on user's response to the following C menu. C------------------------------------------------------- DO WHILE (.NOT. no_more_responses) TYPE 1000 ACCEPT 1001, option IF (option .EQ. '1') THEN CALL add_employees ELSE IF (option .EQ. '2') THEN CALL modify_address ELSE IF (option .EQ. '3') THEN CALL delete_record ELSE IF (option .EQ. '4') THEN CALL list_record ELSE IF (option .EQ. '5') THEN CALL seniority ELSE IF (option .EQ. '6') THEN CALL pair ELSE IF (option .EQ. '7') THEN CALL stats ELSE IF (option .EQ. '8') THEN CALL store_cand ELSE IF (option .EQ. '9') THEN CALL display_cand ELSE IF (option .EQ. '10') THEN CALL find_missing ELSE IF (option .EQ. '11') THEN CALL rdbdollarmissing ELSE IF (option .EQ. '12') THEN CALL mod_resume ELSE IF (option .EQ. '13') THEN CALL display_resume ELSE IF (option .EQ. '14') THEN CALL ddl_stmnt ELSE IF (option .EQ. '15') THEN CALL callable ELSE IF (option .EQ. '16') THEN CALL store_res ELSE IF (option .EQ. '99') THEN no_more_responses = .TRUE. ELSE CONTINUE END IF END DO C---------------------------------------------------- C Menu of options for user to choose database action. C---------------------------------------------------- 1000 FORMAT ('1',' Main Menu'/ 1 ' Sample Application'// 1 ' 1. Add one or more records to EMPLOYEES'/ 1 ' 2. Modify the address of one or more records in EMPLOYEES'/ 1 ' 3. Delete one or more records from EMPLOYEES'/ 1 ' 4. List all the EMPLOYEES and the colleges attended'/ 1 ' 5. List EMPLOYEES in order of seniority'/ 1 ' 6. Pair an EMPLOYEES record with a CANDIDATES record'/ 1 ' 7. Calculate the total number of EMPLOYEES in the company'/ 1 ' 8. Store one or more records in the CANDIDATES relation'/ 1 ' 9. Display one or more records from CANDIDATES'/ 1 ' 10. Display employee IDs of EMPLOYEES in DEGREES with'/ 1 ' an unknown area of study'/ 1 ' 11. Store a record in DEGREES'/ 1 ' 12. Modify a resume in RESUMES'/ 1 ' 13. Display a RESUME'/ 1 ' 14. Add or delete a temporary index'/ 1 ' 15. Retrieve COLLEGES information using Callable RDO'/ 1 ' 16. Store a RESUME'/ 1 ' 99. Exit the Program'// 1 '$Please enter an option number and press RETURN: ') 1001 FORMAT (A2) &RDB& FINISH STOP END