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
bal majduri ik kanuni apradh hai is de bavjud bache ,ghra,hotla,road, kam karn lai majbur han bacheya te mapeya nu parhai val prerit karn lai ik bashan teyar kro

Illustration of Search verb: To illustrate the other use of SEARCH verb, assume we wish to search the similar tab to find the number of persons whose deposited amount is more

Example of Sign condition: The illustration below describes the use of the sign condition. Illustration:     77  BALANCE  PIC  S9 (6) V99.       .       .     I

Point Location: The position of the decimal point is the other characteristic which can be specified in the case of the numeric data items. If the position is not specified, t

Literals: The actual values can too appear in a program. These values are termed as literals. For illustration, the statement MOVE 0 TO TOTAL indicates that the value zero wil

PROGRAM FOR SCREEN SECTION WITH FILES: identification division.   program- id.   environment division.          input-output section.   file-control.     select

INDEXED TABLES: The OCCURS clause that is used to define tables can optionally have an INDEXED phrase. This phrase involves the names of data items which are to be used as sub

Example of Move corresponding: Consider the DATA DIVISION entries shown below. Suppose it is needed that the data stored in the 4 fields of the PAY_REC should be

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

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