Library View Topics Framed Contents Revised Topics Previous Topic Next Topic Search Search ResultsPrevious Topic MatchNext Topic Match Notes List Notes Print Download No PDF Handheld DisconnectedHandheld ConnectedHelp

6.1.6.5.2 Comparing Nonnumeric Operands



Comparisons of nonnumeric operands are made with respect to the collating sequence of the character set in use.

The size of each operand is the total number of characters in that operand; the size affects the result of the comparison. There are two cases to consider:

Operands of Equal Size
Characters in corresponding positions of the two operands are compared, beginning with the leftmost character and continuing through the rightmost character.

If all pairs of characters through the last pair test as equal, the operands are considered as equal.

If a pair of unequal characters is encountered, the characters are tested to determine their relative positions in the collating sequence. The operand containing the character higher in the sequence is considered the greater operand.

Operands of Unequal Size
If the operands are of unequal size, the comparison is made as though the shorter operand were extended to the right with enough spaces to make the operands equal in size.

Table 25 summarizes permissible comparisons with nonnumeric operands.


 Table 25. Permissible Comparisons with Nonnumeric Second Operands         
                   
                   
   First Operand   
                     Second Operand                    
   GR      AL      AN     ANE      NE    FC(2)    NNL  
 Nonnumeric Operand                                                        
        Group (GR)     NN      NN      NN      NN      NN      NN      NN  
   Alphabetic (AL)     NN      NN      NN      NN      NN      NN      NN  
 Alphanumeric (AN)     NN      NN      NN      NN      NN      NN      NN  
 Alphanumeric-edite
             (ANE) 
   NN  
       
   NN  
       
   NN  
       
   NN  
       
   NN  
       
   NN  
       
   NN  
       
    Numeric-Edited 
              (NE) 
   NN  
       
   NN  
       
   NN  
       
   NN  
       
   NN  
       
   NN  
       
   NN  
       
        Figurative 
  Constant (FC(2)) 
   NN  
       
   NN  
       
   NN  
       
   NN  
       
   NN  
       
       
       
       
       
        Nonnumeric 
     Literal (NNL) 
   NN  
       
   NN  
       
   NN  
       
   NN  
       
   NN  
       
       
       
       
       
 Numeric Operand                                                           
        Figurative 
     Constant ZERO 
              (ZR) 
   NN  
       
       
   NN  
       
       
   NN  
       
       
   NN  
       
       
   NN  
       
       
       
       
       
       
       
       
   Numeric Literal 
              (NL) 
 NN(1) 
       
 NN(1) 
       
 NN(1) 
       
 NN(1) 
       
 NN(1) 
       
       
       
       
       
  External Decimal 
              (ED) 
 NN(1) 
       
 NN(1) 
       
 NN(1) 
       
 NN(1) 
       
 NN(1) 
       
 NN(1) 
       
 NN(1) 
       
       Binary (BI)               
        Arithmetic 
   Expression (AE) 
       
       
       
       
       
       
       
       
       
       
       
       
       
       
  Internal Decimal 
              (ID) 
       
       
       
       
       
       
       
       
       
       
       
       
       
       
RevisionX           Internal 
RevisionX     Floating-point 
RevisionX              (IFP) 
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX           External 
RevisionX     Floating-point 
RevisionX              (EFP) 
RevisionX    NN  
RevisionX        
RevisionX        
RevisionX    NN  
RevisionX        
RevisionX        
RevisionX    NN  
RevisionX        
RevisionX        
RevisionX    NN  
RevisionX        
RevisionX        
RevisionX    NN  
RevisionX        
RevisionX        
RevisionX    NN  
RevisionX        
RevisionX        
RevisionX    NN  
RevisionX        
RevisionX        
RevisionX     Floating-point 
RevisionX      Literal (FPL) 
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
RevisionX        
 Note:                                                                     
                                                                           
 (1) Integer item only.                                                    
 (2) Includes all figurative constants except ZERO.                        




Previous Topic Next Topic © Copyright IBM Corp. 1991, 1998

IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.





Return to library:   z/OS | z/OS.e | TPF | z/VSE | z/VM | IBM Hardware | IBM System z Redbooks
Glossary:   IBM terminology
Publications:   How to order publications
Readers:   Download IBM Library Reader | Download IBM Softcopy Reader | Download Adobe® Acrobat® Reader®
Library management:   Download IBM Softcopy Librarian
Contacts:   Contact z/OS


Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.