Example of nested if statement, COBOL Programming

Example of Nested if statement:

Illustration:

Consider the following sentence

863_nested if elese statement.png

The nested IF sentence holds two IFs and one ELSE. The IF-ELSE couple has been marked by the number 1 within a circle. The IF marked with 2 within the circle is alone IF without any ELSE. Now it can be simply seen that the above sentence is equal to the following flow chart.

695_nested if elese statement1.png

 

Posted Date: 10/17/2012 2:05:54 AM | Location : United States







Related Discussions:- Example of nested if statement, Assignment Help, Ask Question on Example of nested if statement, Get Answer, Expert's Help, Example of nested if statement Discussions

Write discussion on Example of nested if statement
Your posts are moderated
Related Questions
ADD and SUBTRACT CORRESPONDING: The CORRESPONDING option can also used with the ADD and SUBTRACT verbs. The following are some of the formats of these verbs with the CORRESPON

Example of Perform statement: PERFORM BEGIN-CALCULATION THRU END-CALCULATION. Assume, BEGIN-CALCULATION and END-CALCULTION is paragraph names. The execution of the PERFORM

Rules for Simple sort verb: The work file is to be defined by a sort elaboration entry (SD entry).The format of SD entry is as shown below. The rules below should be taken

calculate simple interest

OPEN STATEMENT: Whenever a READ or a WRITE operation is executed on a file, then it should be open. The opening of a file may be completed with the help of the OPEN verb. With

Can u please let me know how can i use SSA''s in IMS while fetching segments. Thanks, Rajesh

REWRITE STATEMENT: As in the situation of a relative file, the REWRITE statement needs that the file should be opened in the I-O mode, and if the SEQENTIAL access mode is spec

OCCURS - INDEXED BY PROGRAM: identification division. program- id. searching. environment division. data division. working-storage section. 01 table1.      0

CLOSE statement: The simplified syntax of the CLOSE statement is as shown below:   CLOSE          file-name-1   [WITH   LOCK   ]                         [  , file-

DATA RECORD CLAUSE: The DATA RECORD clause, documents the record names defined for the file. For illustration, DATA RECORDS ARE REC-1, REC-2, REC-3 that means there are 3diffe