COMPARE Macro

The COMPARE macro compares two values. You can:

Parameters: COMPARE Macro

Note: To use a null value for comparison, leave both the Variable Name 2 field and the Constant Value field blank.

Length

Indicates how much of the string in variable 1 is to be compared. The value, if specified, must be a number from 1 through 255. If a value is not specified, the full string or substring, starting from the specified start position, is compared.

Return Codes: COMPARE Macro

Example: COMPARE Macro

In the following example, the COMPARE macro checks whether the value of the &A3 variable is greater than the value of the &A2 variable.

PROD----- Automation Services : COMPARE MACRO Parameter Definition ------------ Command ===> Function=BROWSE .- COMPARE Parameters --------------------------------------------------------. | | | Syntax .......... (Variable 1) OPERATOR (Variable 2)> or (Constant) | | | | | | Variable Name 1 ....... A3 (Enter a valid variable name) | | | | Operator .............. GT (EQ,NE,GT,GE,LT,LE,CT) | | | | Variable Name 2 ....... A2 (Enter a valid variable name) | | | | or Constant Value ... | | | | Start of Compare ...... 1 (Start position within variable 1) | | | | Length ................ (Enter length of comparison) | | | '-----------------------------------------------------------------------------' F1=Help F2=Split F3=Exit F9=Swap


Copyright © 2010 CA. All rights reserved.