C Copyright © Oracle Corporation 1995. All Rights Reserved. SUBROUTINE find_missing C--------------------------------------------------------------- C This subroutine prints the employee id of all the employees C in the DEGREES relation who do not have a value stored in C the DEGREE_FIELD. C--------------------------------------------------------------- IMPLICIT NONE CHARACTER employee_id*5,confirm &RDB& DATABASE EXTERNAL pers = FILENAME 'MF_PERSONNEL' &RDB& DBKEY SCOPE IS FINISH WRITE (6,90) 90 FORMAT ('1',T25,'**** FIND MISSING ****'///) &RDB& START_TRANSACTION READ_ONLY C------------------------------------------------- C Use the MISSING value expression to C find all records in the DEGREES relation that C have the DEGREE_FIELD flagged as missing. Print C the employee ID of all employees in the DEGREES C relation who do not have a value stored in the C DEGREES_FIELD field. C------------------------------------------------- &RDB& FOR D IN DEGREES WITH D.DEGREE_FIELD MISSING &RDB& GET &RDB& employee_id = D.EMPLOYEE_ID &RDB& END_GET TYPE 100, employee_id 100 FORMAT (A) &RDB& END_FOR &RDB& COMMIT PRINT *, ' ' TYPE 300 300 FORMAT ('$',' Press RETURN to continue') ACCEPT 400, confirm 400 FORMAT (A) RETURN END