Example of sign condition , COBOL Programming

Assignment Help:

Example of Sign condition:

The illustration below describes the use of the sign condition.

Illustration:

    77  BALANCE  PIC  S9 (6) V99.

      .

      .

    IF  BALANCE   IS   ZERO GO TO NIL-BALANCE.

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

    IF  BALANCE  =  0  GO TO NIL-BALANCE.

Illustration:

    02  DEPOSIT    PIC  9(4) V99.

    02  WITHDRAWAL  PIC  9(4) V99.

      .

      .

      .

IF  DEPOSIT  -WITHDRAWAL  IS  POSITIVE  GO TO CALCULATION.

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.


Related Discussions:- Example of sign condition

Numeric literals - cobol program, Numeric -   Literals : The numeri...

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

Concept of a two-dimensional table, Concept of a two-dimensional table: ...

Concept of a two-dimensional table: Concept of a two-dimensional table can be easily extended to tables having three or more dimensions. The Handling of tables up to three dim

Non numeric literals - cobol program, Non numeric: The nonnumeric lite...

Non numeric: The nonnumeric literal is used in normal to output messages or headings. The Characters which are enclosed between " " constitute nonnumeric literal. The maximum

Program for inventory , PROGRAM FOR INVENTORY  We have to write a progr...

PROGRAM FOR INVENTORY  We have to write a program to update the inventory file. Consider 2 files,viz, invfile an tranfile. Invfile has 3 fields pno,name,qty. Tranfile has 3 fil

Environment division - cobol programming, Environment Division: The En...

Environment Division: The Environment Division is the second division in the COBOL source program. It is mainly machine-dependent . The computer and all the peripheral dev

Block size - file characteristics , Block Size: The normal practice is...

Block Size: The normal practice is to group a number of consecutive records to form that is termed as a block or a physical record. The number of records in a block is frequen

Minus sign - edit characters for numeric data , Minus sign - edit character...

Minus sign - edit characters for numeric data: The minus sign can appear either at the leftmost or rightmost location of the picture. If an item is negative, a minus sign will

Object-computer - configuration section, Object-Computer - Configuration se...

Object-Computer - Configuration section: The computer name specifies a specific computer on which the object program is to be executed. The MEMORY SIZE is used to show the

Redefine clause, Can we declare a redefine clause as below? A Redefines B, ...

Can we declare a redefine clause as below? A Redefines B, PIC X(4)

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd