Logo 
Search:

Cobol Articles

Submit Article
Home » Articles » Cobol » Homework HelpRSS Feeds

Program describes the functionality of EVALUATE clause

Posted By: Megan Brown     Category: Cobol     Views: 2969

program describes the functionality of EVALUATE clause.

Code for Program describes the functionality of EVALUATE clause in Cobol

       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
  
Share: 


Didn't find what you were looking for? Find more on Program describes the functionality of EVALUATE clause Or get search suggestion and latest updates.

Megan Brown
Megan Brown author of Program describes the functionality of EVALUATE clause is from London, United Kingdom.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!