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

Program for master file maintenance , PROGRAM FOR MASTER FILE MAINTENANCE: ...

PROGRAM FOR MASTER FILE MAINTENANCE: We have to write a program to keep the stu-file for which a record has just 2 fields,viz., rno(Roll Number) and name(Student Name). Give t

Display statement, DISPLAY STATEMENT:   The function of the DISPLAY s...

DISPLAY STATEMENT:   The function of the DISPLAY statement is just opposite to that of the ACCEPT statement. It is used to display the low-volume results on the operator's co

Program of occurs clause, OCCURS CLAUSE - PROGRAM: We have to write a ...

OCCURS CLAUSE - PROGRAM: We have to write a program to elaborate occurs clause. Get names and marks of the students and show them on the screen.   identification division.

Program for if condition, PROGRAM FOR IF :   We have to write a progr...

PROGRAM FOR IF :   We have to write a program to check whether the given number is ODD or EVEN. Identification division. Program- id. Ifst. 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

Picture clause, Picture Clause: The picture clause explains the genera...

Picture Clause: The picture clause explains the general characteristics of an elementary data item. These characteristics are elaborated below: Class: In COBOL the

Reserve clause and organization/access clause, RESERVE clause: This cl...

RESERVE clause: This clause indicates the number of buffers to be used for the file. Integer-1 specifies this number. ORGANIZATION/ACCESS clause: These two clause

The LENDER Bank, The LENDER Bank offers mortgages on homes valued up to $50...

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

What are name the divisions in a cobol program, Name the divisions in a COB...

Name the divisions in a COBOL program are given below DENTIFICATION DIVISION DATA DIVISION ENVIRONMENT DIVISION PROCEDURE DIVISION.

Add and subtract corresponding, ADD and SUBTRACT CORRESPONDING: The CO...

ADD and SUBTRACT CORRESPONDING: The CORRESPONDING option can also used with the ADD and SUBTRACT verbs. The following are some of the formats of these verbs with the CORRESPON

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