Comparison of nonnumeric operands - relational condition, COBOL Programming

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:

The Characters in the equivalent positions are compared to determine the value of the relational condition. The Comparison begins with the leftmost character in both the fields and proceeds in a left to right side manner. If the 2 characters being compared are found to be unequal at any stage, the field containing the biggest characters is considered to be greater. When the characters are only found to be identical does the comparison proceed to the later position on the right.  The 2 fields are taken to be equal only when all these pairs of characters have been found to be similar and the rightmost end has been reached.

(ii) Fields of Unequal Sizes:

If the two operands are not of equivalent size, the shorter field is considered to be extended on the right by spaces to make its size equivalent to the longer field and the rules for comparing fields of equal sizes are used. 

 

Posted Date: 10/17/2012 1:35:47 AM | Location : United States







Related Discussions:- Comparison of nonnumeric operands - relational condition, Assignment Help, Ask Question on Comparison of nonnumeric operands - relational condition, Get Answer, Expert's Help, Comparison of nonnumeric operands - relational condition Discussions

Write discussion on Comparison of nonnumeric operands - relational condition
Your posts are moderated
Related Questions
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.

Buffers: The Modern computers are able of handling I-O operations independent of the CPU by means of the hardware termed as data channel. For illustration, if two buffers a

Display control verbs in Cobol

DECLARATIVE and FILE STATUS Clause: The input-output exception condition in the situation of a direct access files can be handled by a declarative procedure in a manner simila

I need help with a COBOL programming assingment. I have started the program but I need help completing the program. I have 5 errors. Here is the question. 10. Suppose your company

Examples - Edit characters for numeric data: The following illustration illustrates the use of Z editing characters. The character b is used to indicate the space character an

/ (Slash Insertion): The edit character slash (/) also termed as virgule or stroke, may appear anyplace in the picture. When used, it will be inserted. More than one slash can

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

COMPOUND CONDITION: The two simple conditions can be connected by the logical operators AND or OR to form a compound condition (also termed as combined condition). When two co

, (Comma) : A comma, whenever used in a picture, is considered as an insertion character and inserted wherever it become visible. There can be more than one comma in the pictu