14 2 CMP_IDX Command

LANSA Technical

14.2 @@CMP_IDX Command

The @@CMP_IDX command is used to compare an index value with a numeric value. This index name may be a new or existing index. If the index is a new index name, then the index value will be set to 1. The maximum number of indexes which can be used in an application template is 999.

                                                         Required 

                                                                  

  @@CMP_IDX ----- IDX_NAME ----- name --------------------------> 

                                                                  

             >--- IDX_VALUE ---- value -------------------------> 

                                 numeric variable                 

                                                                  

 -----------------------------------------------------------------

                                                         Optional 

             >-----IF_LT ------- label -------------------------> 

                                                                  

             >-----IF_GT ------- label -------------------------> 

                                                                  

             >-----IF_EQ ------- label -------------------------| 

                                                                  

                                                                  

Parameters

IDX_NAME

Specifies the new or existing index name. The first character of the two character index name must be non-numeric.

IDX_VALUE

Specifies the numeric value to be compared with the index value. This may be any valid numeric variable, any valid index name or any valid numeric literal.

IF_LT

Specifies the label of the command which is to receive control if the value of the index is less than the comparison value. The label specified in this parameter must be the label of one and only one other command in the application template.

IF_GT

Specifies the label of the command which is to receive control if the value of the index is greater than the comparison value. The label specified in this parameter must be the label of one and only one other command in the application template.

IF_EQ

Specifies the label of the command which is to receive control if the value of the index is equal to the comparison value. The label specified in this parameter must be the label of one and only one other command in the application template.