If statement - cobol programming, COBOL Programming

IF STATEMENT:

The easiest form of the IF statement is 

IF condition-1 statement-1

where the condition-1 may be any one from the shown below.

2246_IF STATEMENT -.png

When the condition-1 becomes true then statement-1 will be executed. The Statement-1 can be an easy statement or a compound statement. If the conditions fail then control goes to the next statement.

Illustration:

1)  IF A > B DISPLAY " A IS BIG"

2)   IF BASIC-PAY  NOT  > 5000 GO TO TEST-PARA.

Posted Date: 10/17/2012 1:51:41 AM | Location : United States







Related Discussions:- If statement - cobol programming, Assignment Help, Ask Question on If statement - cobol programming, Get Answer, Expert's Help, If statement - cobol programming Discussions

Write discussion on If statement - cobol programming
Your posts are moderated
Related Questions
Comparison of the Numeric Operand with Nonnumeric Operand: The numeric operand can be compared to the nonnumeric operand subject to the restrictions which are as follows.

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

PROGRAM FOR ADD CORRESPONDING: We have to write a simple program to demonstrate Add Corresponding.   identification division.   program- id.   environment division.

FILE CHARACTERISTICS: The task of file handling is the responsibility of the system software termed as IOCS (Input-Output control system). Record Size: We know that th

Example of Class condition: Let the BASIC-PAY be a data name in the card record defined with picture 9(5) V99. By reading the card we can test the value of the BASIC-PAY to ma

Rules for constructing an Arithmetic Expression: The rules for constructing an arithmetic expression are as shown below: (i) When an arithmetic expression specifies a calcu

VALUE CLAUSE: The value clause defines the preliminary value of the data item. Normally initialization will be completed just before the first statement in the procedure di

LABEL RECORD CLAUSE: This clause specifies whether or not the standard header and trailer labels must be present in the magnetic-tape files. VALUE OF CLAUSE: The VAL

BLANK WHEN ZERO: BLANK WHEN ZERO is an editing clause that may be used along with a picture. This will set the whole data item to blanks of its value is equal to zero. Though,

The LENDER Bank offers mortgages on homes valued up to $500,000. The required down payment is calculated as follows: 4% of the first $60,000 borrowed 8% of the next $30,000 borro