@@IFSTRCMP
The @@IFSTRCMP command in an Essbase calculation macro compares a macro input parameter to a string. If the input parameters match, the macro statements following the command are processed. Otherwise, the statements following @@ELSE are processed.
Syntax
@@IFSTRCMP( @@x , token ) statement @@ELSE... [statement]@@ENDIF
Where:
-
@@x is a variable representing a macro argument
-
token is a string to be compared to the macro argument
-
statement is operations to be performed depending on the results of the test
Notes
The @@IFSTRCMP statement block must use the @@ELSE statement as part of its decision syntax. You do not have to include a statement after @@ELSE.
Example
@@IFSTRCMP (@@2, @_NULL)
@@1
@@ELSE
(@@1 + @@2)
@@ENDIF
This test checks to see if the second macro argument is blank. If it is, then only the first argument is used. If the second argument is not blank, then the two arguments are added.