Example of nested if statement, COBOL Programming

Example of Nested if statement:


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
OCCURS - INDEXED BY PROGRAM: identification division. program- id. searching. environment division. data division. working-storage section. 01 table1.      0

WRITE Statement:      The WRITE statement for a relative file has the format which is as shown below.          WRITE  record-name   [ FORM   identifier ]

FILE DESCRIPTION- FIXED-LENGTH RECORDS: The normal characteristics of a file are explained in the file description (FD) entry of the DATA DIVISION.

PROGRAM TO DEMONSTRATE SORT VERB: The file for which a record having 2 fields, viz., Account Number and Name is already available. Sort the file based on the ascending order o

MOVE CORRESPONDING: It is frequently required to move some of the data items of one group to some other data items in the other group. If the names of the equivalent data item

PROGRAM FOR ELECTRICITY BILL: An electricity company supplies electricity to 4 types of customers coded 1, 2, 3 & 4.The rate schedule for customers is shown in one table as

DELETE STATEMENT: The format of the delete statement is as shown below: DELETE   file-name RECORD   [  ;   INVALID   KEY  imperative-statement  ] Whenever the ACCESS MOD

FILE STATUS clause: This clause has been involved in the above syntax for completeness. The ORGANIZATION, REVERSE, ACCESS and STATUS clause can be specified in any order.

NESTED IF STATEMENT:   The then and else statement of an IF statement can hold other IF statements. The involved IF statements in their turn may also hold other IF statements

Example of Open statement: Illustration: The OPEN INPUT TRANSACTION, OLD-MASTER OUTPUT NEW-MASTER. The illustration represents that there are two input files named the