Example of sign condition , COBOL Programming

Example of Sign condition:

The illustration below describes the use of the sign condition.


    77  BALANCE  PIC  S9 (6) V99.




It may be illustrious that the above IF statement is equivalent to the below statement which makes use of the relational condition.



    02  DEPOSIT    PIC  9(4) V99.

    02  WITHDRAWAL  PIC  9(4) V99.





The control is transferred to the paragraph named the CALCULATION if the present value of the DEPOSIT is greater than that of the WITHDRAWAL.

In normal, any sign condition can be substituted by an equivalent relational condition. Use of the sign condition might perhaps be convenient in many cases and it may also use to increase the readability of the statement which uses it.

Posted Date: 10/17/2012 1:40:01 AM | Location : United States

Related Discussions:- Example of sign condition , Assignment Help, Ask Question on Example of sign condition , Get Answer, Expert's Help, Example of sign condition Discussions

Write discussion on Example of sign condition
Your posts are moderated
Related Questions
We have input file, record layout is EMP ID (6 char) , EMP NAME (20 char), Designation (3 char),Salary (5 digit) Base Branch (10char) Grade (3 Alphanumeric). This is the input f

ROUNDED OPTION: Let us consider the DATA DIVISION entries which are as shown below: Now, subsequent to the execution of the statement ADD A B GIVING C, the C will hold

File Description for the Relative and Indexed Files: The FD entry for a relative or an indexed file is similar to that of a sequential file. Some compilers do not permit varia

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

Numeric -   Literals : The numeric literal can be created with the help of digits only. It can have a sign (+ or -) and can also have a decimal point. If no sign is specifi

Example of Nested if statement: Illustration: Consider the following sentence The nested IF sentence holds two IFs and one ELSE. The IF-ELSE couple has been marke

SIGN CONDITION:   The sign condition establishes whether or not the algebraic value of an operand is negative, positive or zero. The operand can be either the numeric identif

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

Display control verbs in Cobol