Ü  COMP

·         This field level keyword is used to specify some criteria for the value entered into it. Of course the field will be either input or both types. If the value entered into the field doesn’t satisfy the criteria mentioned with the keyword COMP, then an error message is displayed.

·         The syntax of the keyword is:

·         COMP(relational-operator value).

·         The valid entries for the relational operator are:

·         Relational Operator value =

·         EQ (Equal)

·         NE (Not equal)

·         LT (Less than)

·         GT (Greater than)

·         LE (Less than or equal)

·         GE (Greater than or equal)

 

 

Example

 

 


Columns . . . :    1 100                   Browse                       IROBO1/QRPGLESRC
 SEU==>                                                                             DSP6
 FMT DP .....AAN01N02N03T.Name++++++RLen++TDpBLinPosFunctions+++++++++++++++++++++++++++
       *************** Beginning of data ***********************************************
0001.00      A                                      DSPSIZ(24 80 *DS3)
0002.00      A                                      CA03(03 'EXIT')
0003.00      A          R DETAIL001
0004.00      A                                  3  2'FIELD-01: '
0005.00      A                                      COLOR(YLW)
0006.00      A            FLD01          2Y 0B  3 15COMP(GT 5)          >>>>>>>>>>>>
       ****************** End of data **************************************************


 

 

If we enter value 01 and then press ENTER, we get the error message “Value must be greater than 5".

             

 

                                                                               
 FIELD-01:    01                                                               
                                                                               
                                                                               
                                                                                
                                                                               
                                                                               
                                                                      
                                                                               
 Value must be greater than 5.   

 

 




 

 







User Comments:



Subscribe

.  


Copyright © www.go4as400.com, 2013-2023. Copyright notice   Terms of services   Privacy policy