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
WRITE Statement:      The WRITE statement for a relative file has the format which is as shown below.          WRITE  record-name   [ FORM   identifier ]

RULES OF RENAMES CLAUSE:   The rules below should be observed while using the RENAMES clause: (i) All RENAMES entries should be written only after the last record descript

Rules of read statements: The next record is identified according to the rules as shown below: (i) Whenever the READ NEXT statement is the initial statement to be executed

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

Format for COBOL Programs: The COBOL is a high-level language. Therefore, a COBOL program can be executed on a computer for which a COBOL compiler exists. The compiler transla

CONDITION - COBOL Programming: The condition is an entity which at one point of time can have only one of the two values - true or false. As we already know that, the IF verb

REWRITE statement: The REWRITE statement is used to update the existing record in a disk file. The normal format is as shown below: REWRIE  record-name  [  FROM      ide

SEARCH VERB: The SEARCH verb is used to position elements in one-dimensional tables. Let us consider the following problem. Assume that each element of a table consists of thr

RELATIONAL CONDITION:   We know that a relational condition specifies a comparison between two operands and has the form.     Operand-1    relational-operator   operand-2

RULES FOR OCCURS CLAUSE: The rules apply for the OCCURS clause and the subscripts are as shown below. (1) The integer in the OCCURS clause should be a positive integer.