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
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

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

Currency Sign - edit characters for numeric data: $ (Currency Sign): The single currency sign can appear at the leftmost place of a picture. In that situation the $ cha

Figurative Constants: The Figurative constants have several fixed names and the compiler recognizes these names and it sets up the equivalent values in the object program.

PROGRAMS FOR REDEFINES CLAUSE: We have to write a simple program to explain the REDEFINES clause at 01 level. identification division. program- id. Redef. environment

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

RULES FOR INDEXED TABLES: The rules of indexing a table with an INDEXED phrase are as shown below: (1) If indexing is completed for any one level of a table, then indexing


WRITE STATEMENT: The records are written to be logical place as determined from the value of the record key. The INVALID KEY condition occurs in the cases shown below: (i)