Illustration of the abbreviation - compound condition, COBOL Programming

Assignment Help:

Illustration of the abbreviation:

A few illustration of the abbreviation are given below:

Illustration:

The compound condition 

AMOUNT GREATER THAN 499 AND AMOUNT LESS THAN 1000

can be abbreviated to

AMOUNT GREATER THAN 499 AND LESS THAN 1000

Here, the second appearance of the general subject AMOUNT has been absent.

Illustration:

The compound condition

CARD-CODE    =    3    OR    CARD-CODE   =   5   OR  CARD-CODE   =  7

may be abbreviated to

CARD-CODE   =  3   OR   5   OR   7

In this, the subjects as well as the relational conditions in the given compound condition are similar. Accordingly, the second and third appearances of the subject and the relational condition have been absent.

The consecutives relational conditions which are being considered for the abbreviation may also hold the word NOT. In this situation the interpretation of the abbreviated condition can become ambiguous. To solve the ambiguity the rule below has been recommended in the ANS I standard. The term NOT preceding a relational operator in an abbreviated condition is considered part of the relational operator. Or else, NOT is considered to be a logical operator negating the condition preceded by it. The illustration below can help to understand this rule.

Illustration:

The condition

AGE LESS THAN 30 AND NOT LESS THAN 20 OR 40

is interpreted to be the abbreviation of a compound condition AGE LESS THAN 30 AND AGE NOT LESS THAN 20 OR AGE NOT LESS THAN 40

This is because the NOT precedes the relational operator LESS THAN in the abbreviated condition and as such it is interpreted to be a section of the relational operator NOT LESS THAN.


Related Discussions:- Illustration of the abbreviation - compound condition

Comparison of nonnumeric operands - relational condition, Comparison of Non...

Comparison of Nonnumeric Operands: A nonnumeric operand can be compared to the other nonnumeric operand according to the rules as shown below: (i) Fields of Equal Sizes:

File-control paragraph for the indexed files, FILE-CONTROL paragraph for th...

FILE-CONTROL paragraph for the indexed files: The common format for the SELECT clause for a file is as shown below: SELECT  file-name  ASSIGN   TO  implementor -name

Example of write statement, Example of Write statement: Illustration:...

Example of Write statement: Illustration: (i) WRITE TRANS-RECORD AFTER ADVANCING 3 LINES. This WRITE statement specified that the TRANS-RECORD is a record name of a fi

Perform with varying option, PERFORM WITH VARYING OPTION: The format i...

PERFORM WITH VARYING OPTION: The format is as shown below:

Introduction to cobol, Introduction to COBOL: In the year 1959, a new ...

Introduction to COBOL: In the year 1959, a new language named the COBOL ( CO mmon B usiness O riented L anguage) was introduced remembering the business purpose application

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

Subscript and index, What is the difference between subscript and index

What is the difference between subscript and index

Comparison of the numeric operand with nonnumeric operand, Comparison of th...

Comparison of the Numeric Operand with Nonnumeric Operand: The numeric operand can be compared to the nonnumeric operand subject to the restrictions which are as follows.

Example of compound condition, Example of compound condition: In commo...

Example of compound condition: In common, a compound condition has the form which is as shown below: Where condition-1 & condition-2 can be any one of the below:

Example of redefines clause, Example of Redefines clause: This illustr...

Example of Redefines clause: This illustration describes a sales record that may either contain the total amount of sale or the quantity (QTY) and UNIT-PRICE. The aim of such

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