     MOVE ‘123456789’ TO WS-SEARCH-EMP-NUM
* NOTE: THE EMPLOYEE DEMO-DATABASE IS NOT Y2K COMPLIANT
     MOVE ‘970501’   TO WS-SEARCH-DATE

     MOVE WS-SEARCH-EMP-NUM TO EMPLOYEE-NUM
     OBTAIN CALC EMPLOYEE-REC
     IF DB-REC-NOT-FOUND
        DISPLAY ‘ EMPLOYEE-NUM=‘ EMPLOYEE-NUM ‘ WAS NOT FOUND’
     ELSE
        PERFORM IDMS-STATUS
        DISPLAY ‘ EMPLOYEE-NUM=‘ EMPLOYEE-NUM
                ‘ EMPLOYEE-NAME=‘ EMPLOYEE-NAME
        MOVE WS-SEARCH-DATE TO START-DATE
        OBTAIN JOBHIST WITHIN EMPLOYEE-JOBHIST USING START-DATE
        IF DB-REC-NOT-FOUND
           DISPLAY ‘NO JOBHIST FOUND FOR DATE=‘ START-DATE
        ELSE
           DISPLAY ‘START DATE=‘ START-DATE
                   ‘ JOB-TITLE=‘ JOB-TITLE
        END-IF
     END-IF
