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.10 Combined Conditions



Two or more conditions can be logically connected to form a combined condition.


    ___ Format _____________________________________________________________ 
   |                                                                        |
   |                  <______________________                               |
   | >>__condition-1____ _AND_ __condition-2_|___________________________>< |
   |                    |_OR__|                                             |
   |                                                                        |
   |________________________________________________________________________|
The condition to be combined can be any of the following:


 Table 28. Combined Conditions--Permissible Element Sequences              
 Combined  
 condition 
 element   
        
 Left   
 most   
 When not leftmost,   
 can be immediately   
 preceded by:         
        
 Right  
 most   
 When not rightmost,  
 can be immediately   
 followed by:         
 simple-   
 condition 
 Yes    
        
 OR NOT AND (         
                      
 Yes    
        
 OR AND )             
                      
 OR AND    
           
 No     
        
 simple-condition )   
                      
 No     
        
 simple-condition NOT 
 (                    
 NOT         Yes      OR AND (               No       simple-condition (   
 (         
           
 Yes    
        
 OR NOT AND (         
                      
 No     
        
 simple-condition NOT 
 (                    
 )           No       simple-condition )     Yes      OR AND )             


Parentheses are never needed when either ANDs or ORs (but not both) are used exclusively in one combined condition. However, parentheses can be needed to modify the implicit precedence rules to maintain the correct logical relation of operators and operands.

There must be a one-to-one correspondence between left and right parentheses, with each left parenthesis to the left of its corresponding right parenthesis.

Table 29illustrates the relationships between logical operators and conditions C1 and C2.


 Table 29. Logical Operators and Evaluation Results of Combined Conditions 
 Value  
 for C1 
 Value   
 for C2  
 C1 AND 
 C2     
 C1 OR   
 C2      
 NOT (C2 
 AND C2) 
 NOT C1 
 AND C2 
 NOT (C1 
 OR C2)  
 NOT C1 
 OR C2  
 True     True      True     True      False     False    False     True   
 False    True      False    True      True      True     False     True   
 True     False     False    True      True      False    False     False  
 False    False     False    False     True      False    True      True   

Subtopics:



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.