Jan What I do is define all variables up front.
SET VAR vd1 INTEGER SET VAR vd1txt TEXT IF vd1 IS NOT NULL THEN SET VAR vd1txt = (CTXT(.vd1)) ELSE --This is to make sure the vd1text is set to NULL SET VAR vd1text = null ENDIF Buddy -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jan Johansen Sent: Tuesday, April 26, 2005 11:56 AM To: RBG7-L Mailing List Subject: [RBG7-L] - Variable question What syntax can I use to create a variable if I check for the existance of a variable? I'm trying to pass parameters that may not exist. So if they dont exist create them. I've tried IF vd1 EXISTS THEN SET VAR vd1txt = (CTXT(.vd1)) ELSE SET VAR vd1txt = NULL ENDIF but since vd1 doesn't exist it errors out. Turning off error messages doesn't help. So is there a way to create a variable based on the fact that another variable exists or not? Jan
