program describes the functionality of EVALUATE clause.
IDENTIFICATION DIVISION. PROGRAM-ID. EVALUATE1. DATA DIVISION. WORKING-STORAGE SECTION. 77 MARKS PIC 9(3). 88 FIRST1 VALUE 60 THRU 100. 88 SECOND1 VALUE 50 THRU 59. 88 PASS1 VALUE 40 THRU 49. PROCEDURE DIVISION. PARA-1. DISPLAY "ENTER PECENTAGE OF MARKS :-> " WITH NO ADVANCING. ACCEPT MARKS. EVALUATE TRUE WHEN FIRST1 DISPLAY "FIRST CLASS" WHEN SECOND1 DISPLAY "SECOND CLASS" WHEN PASS1 DISPLAY "PASS CLASS" WHEN OTHER DISPLAY "FAIL" END-EVALUATE. STOP-RUN. #--------------------------------------------------------------------------------# OUTPUT #--------------------------------------------------------------------------------# ENTER PERCENTAGE OF MARKS :-> 65 FIRST CLASS