IF SELECTION [NOT
                                 																UNIQUE [IN [FIELDS]]]
                           																operand1
                           																 |  
                        												
                     
   [THEN]
                              																statement |  
                        												
                     
   [ELSE
                           																statement |  
                        												
                     
  END-IF |  
                        												
                     
                           																 IF SELECTION
                              																[NOT UNIQUE [IN [FIELDS]]]
                           																operand1 |  
                        												
                     |||||
 [THEN] 
                         |  
                        														
                        
                           																
                            
  |  
                        														
                        statement | 
                           																
                            
  |  
                        														
                        ||
 DO
                           																statementDOEND 
                         |  
                        												
                     |||||
| 
                           																
                            
  |  
                        														
                         ELSE 
                         |  
                        														
                        
                           																
                            
  |  
                        														
                        statement |  
                            
  |  
                        														
                        |
 DO
                           																statementDOEND 
                         |  
                        												
                     |||||
This document covers the following topics:
For explanations of the symbols used in the syntax diagram, see Syntax Symbols.
Related Statements: DECIDE
                        								FOR | DECIDE
                        								ON | IF 
               
Belongs to Function Group: Processing of Logical Conditions
The IF SELECTION statement is used to verify that in a
                  										sequence of alphanumeric fields one and only one contains a value.
               
Operand Definition Table:
| Operand | Possible Structure | Possible Formats | Referencing Permitted | Dynamic Definition | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
 operand1
                           																		
                         |  
                        																
                        S | A | A | U | L | C | yes | no | ||||||||||||
Syntax Element Description:
| Syntax Element | Description | 
|---|---|
                           																		
                           																		operand1 
                         |  
                        																
                         
                           																		
                             Selection Field(s):   
                           																		
                           As operand1 you specify the fields which are to be checked. If you specify an attribute control variable (Format C),
                              																				it is considered to contain a value if its status has been changed to
                              																				 Note:  |  
                        														
                     
 THEN statement
                              																		... 
                         |  
                        																
                         
                           																		
                            THEN Clause:  
                           																		
                           The statement(s) specified in the  
 This statement is generally used to verify that a terminal
                              																				user has entered only one function in response to a map displayed via an
                              																				 Note:  |  
                        														
                     
ELSE statement
                              																		... 
                         |  
                        																
                         
                           																		
                            ELSE Clause:  
                           																		
                           In the   |  
                        														
                     
 END-IF 
                         |  
                        																
                         
                           																		
                            End of IF SELECTION
                                 																				Statement:  
                           																		
                           In structured mode, the Natural reserved word
                              																				 In reporting mode, use the   |  
                        														
                     
** Example 'IFSEL': IF SELECTION ************************************************************************ DEFINE DATA LOCAL 1 #A (A1) 1 #B (A1) END-DEFINE * INPUT 'Select one function:' // 9X 'Function A:' #A 9X 'Function B:' #B * IF SELECTION NOT UNIQUE #A #B REINPUT 'Please enter one function only.' END-IF * IF #A NE ' ' WRITE 'Function A selected.' END-IF IF #B NE ' ' WRITE 'Function B selected.' END-IF * END
Select one function:                        
                                            
         Function A:           Function B: 
               								Page      1                                                  05-01-17  11:04:07
                                                                               
Function A selected.