RAMESH KRISHNA REDDY mainframe discussion forum - cobol, db2,cics,jcl,file-aid,changeman,interview questions
Online Tutorials   | PREV  | TOP  | NEXT



DRONA SERIES
COBOL STUDY MATERIAL


PROCEDURE DIVISION



   
 

COBOL PROCEDURE DIVISION



PROCEDURE DIVISION This division contains the actual program logic. Program logic can be divided into sections and paragraphs. One Section contains One or more paragraphs. One paragraph contains one or more number of sentences. A sentence is a series of one or more COBOL statements ending with a period. A Satement starts with COBOL verb. Example - MOVE A TO B COMPUTE C = B + D. In above example sentence starting with COBOL verb MOVE and it also contains another verb COMPUTE. This sentence ended by a period. This sentence contains two statements. One is MOVE A TO B, Second Statement is COMPUTE C = B + D. Below example shows the syntax of PROCEDURE DIVISION. PROCEDURE DIVISION. ... < user-defined-section-name SECTION> .... < user-defined-para-name>. ... ].... Without section, we can code paragraph. In most programs, the need of SECTION wont arise. Section & Paragraph Names are userdefined names. Starts in Area A. Ends with a period. In case of section name, userdefine name followed with SECTION word as showed in above example. Paragraph body ends when another para name or section name apears or end of the procedure division. Example - 100-FIRST-OPEN-PARA. ... ... 100-FIRST-LOGIC-PARA. ... ... 100-FIRST-CLOSE-PARA. ... ...
    

NEXT CHAPTER TOPIC : COBOL


                                   



Previous chapter in COBOL tutorial Starting of COBOL tutorial Next chapter in COBOL tutorial


Visit COBOL books section in this site for good books




Home | Donations | Online Tutorials | Books | Entertainment | Contactme | privacy |  sql tutorial | jcl interview questions | JCL Tutorial | JCL Tutorial - chapter1 | JCL Tutorial - chapter2 | JCL Tutorial - chapter3 | JCL Tutorial - chapter4 | JCL Tutorial - chapter5 | JCL Tutorial - chapter6 | JCL Tutorial - chapter7 | JCL Tutorial - chapter8 | JCL Tutorial - chapter9 | JCL Tutorial - chapter10 | JCL Tutorial - chapter11