Albert,
This Fails if vDatum has not already been dimensioned.

clear var vDatum  -- clear the variable
SET VAR vdatum = (IFNULL(.vdatum,(.#DATE - 2),.vdatum))
-ERROR- Column or variable vdatum not found (2515)
-ERROR- Expression cannot be evaluated. (2179)

That was the reason for the method I posted.  It has Always been that if good
programming practice wasn't employed as in setting the variable like:

Set var vDatum SomeDataType

Immediately prior to checking if it had a value of some kind, cause it would
always fail as above.  In the absence of good practice (which I confess I
ignored for many years), I just used the expression:

SET VAR vcheckvar = .vTestVar
set var vCheckVar = (IFEQ('.',(SGET(.vcheckvar,1,1)), 'Not Exist', 'Exists'))

to check for the leading dot if the variable had not been dimensioned and being
too pigheaded to use the correct method as above...

Reply via email to