Would anyone know of a way to test for the EXISTENCE of a variable? That is, does it actually exist (been declared) regardless of its (assigned) value, NULL or otherwise?
I thought that IFEXISTS() would do this, but, as far as I can tell, it works pretty much like IFNULL().
Am I missing something?
Hmmmm ...
How about defining a check variable, such as vCheck (without pre-defined data type).
Example:
SET VAR vCheck = (CTXT(.vTheVariableToChk))
Then, trap the -ERROR- variable!
If vTheVariableToChk exists, vCheck will not generate -ERROR-. Otherwise, R:BASE will generate ERROR #2161 and ERROR #2179.
-ERROR- Unrecognized global variable in expression. (2161) -ERROR- Expression cannot be evaluated. (2179)
Hope that helps!
Very Best R:egards,
Razzak.