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

Illustration of nested if statement, Illustration of nested if statement: ...

Illustration of nested if statement: Consider the nested sentence which is as shown below: The IF-ELSE pairs in this sentence can be detected by applying the rule whic

Example of move corresponding, Example of Move corresponding: Consider...

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

Kirat da satikar, bal majduri ik kanuni apradh hai is de bavjud bache ,ghra...

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

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

Program for compute verb, PROGRAM FOR COMPUTE VERB: We have to write a...

PROGRAM FOR COMPUTE VERB: We have to write an easy program to elaborate the COMPUTE verb.  Identification division. Program- id. compverb. Environment division. Da

Program for sequential file creation & rewriting , Program for Sequential F...

Program for Sequential File Creation & Rewriting  We have to write a program to create a Length file with just two fields: l (Length) and l-c (Length-Code). Add a few records.

Illustration of perform statement, Illustration of perform statement: ...

Illustration of perform statement: PERFORM    CALCUALTE-TAX. In this illustration, the CALCULATE-TAX is either a section name or paragraph name. Assume that it is a section

Program for perform - until, PROGRAM FOR PERFORM ...UNTIL We have to w...

PROGRAM FOR PERFORM ...UNTIL We have to write a program to find the sum of "n" natural numbers. Identification division. Program- id. PerfUntil. Environment division.

Program for indexed sequential file creation-mode, PROGRAM FOR INDEXED SEQU...

PROGRAM FOR INDEXED SEQUENTIAL FILE CREATION (RANDOM MODE): We have to write a program to create an Indexed Sequential File in random mode for Student particulars. Suppose jus

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