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
RELATIVE FILES: The Files that are stored on a direct access storage medium like magnetic disk are frequently known as direct access files. The COBOL supports three different

PROGRAM FOR INDEXED SEQUENTIAL FILE CREATION: We have to write a program to create an Indexed Sequential File in a dynamic mode for Student particulars. Suppose just 3 fields:

INPUT AND OUTPUT PROCEDURE IN SORT STATEMENT: The common format of the SORT statement can write as shown below: The format of the RELEASE statement is as shown be

START STATEMENT: The START statement places the files to the initial logical record whose record key satisfies the condition specified by the KEY phrase. The access mode shoul

Example of read statement: Illustration: READ OLD-MASTER AT END MOVE ZERO TO END-OF-RECORDS. As a result of this statement, generally the next record from the OLD-MAST

Illustration of Multiply verb: (a)  MULTIPLY A BY B. In this situation the value of A & B will be multiplied and the product will be stored in B.  The decimal point locatio

PROGRAM FOR SUBTRACT VERB: We have to write a simple program to elaborate the SUBTRACT verb. You can also use edit characters in the program. Identification division. Pr

Illustration of Renames clause: In the illustration, PAT-OTHER-THAN-BASIC will become a fresh group consisting of DEARNESS-ALLOWANCE, HOUSE-RENT & MTHLY-INCENTIVE. Keep in min

can we move spaces to numeric field

There are some restrictions when these procedures are used. (i) The Procedure should not contain any SORT/MERGE statement. (ii) An explicit transfer of the control outside