Illustration of the abbreviation - compound condition, COBOL Programming

Illustration of the abbreviation:

A few illustration of the abbreviation are given below:


The compound condition 


can be abbreviated to


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


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.


The condition


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.

Posted Date: 10/17/2012 1:50:00 AM | Location : United States

Related Discussions:- Illustration of the abbreviation - compound condition, Assignment Help, Ask Question on Illustration of the abbreviation - compound condition, Get Answer, Expert's Help, Illustration of the abbreviation - compound condition Discussions

Write discussion on Illustration of the abbreviation - compound condition
Your posts are moderated
Related Questions
Edit Characters for Numeric Data: The characters below can be used in the PICTURE clause to indicate the editing.   Z    *  $  -    +    CR    DB    .    ,    B    O    /

MERGE VERB WITH OUTPUT PROCEDURE: Like the sort verb, the merge verb can also have an output procedure. The syntax of the MERGE verb is as shown below:   The r

CLOSE STATEMENT: When the processing of a file is completed, then the file may be closed. This is completed with the help of the CLOSE-verb. The form of the CLOSE statement is

RULES OF MOVE VERB:  The Data movement is managed by the rules which are as shown below: (a) The contents of the identifier - 1 or the value of the literal - 1 is moved to

Example of constructing an arithmetic expression: An arithmetic expression may be proceeded by a + or - sign. These operations are known as unary + or unary - operators. Il

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

Example of Class condition: Let the BASIC-PAY be a data name in the card record defined with picture 9(5) V99. By reading the card we can test the value of the BASIC-PAY to ma

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

INPUT-OUTPUT SECTION: This section holds information regarding the files to be used in the program. There are 2 paragraphs in this section- FILE-CONTROL & I-O-CONTROL. The

Rules for apply for the condition name: The rules below apply for the condition name. (i) The Condition names should be explained at level 88. The level number starts in ma