Check is var exists and create it if it does not

  • Follow


Hey all,

Is there a way to check if a VAR exists (or does not exist) and create 
it if it does not exist.

I have a script that someone else wrote that uses a variable called 
WEIGHT.  Currently this variable is not in the dataset so I have created
a constant COMPUTE WEIGHT = 1.  I am afraid I will forget about this 
line of code sometime in the future when the variable actually does 
exist in the dataset and is someone other than 1.

Is there a way to attach a condition to this so that the COMPUTE 
statement is run only if the variable does not already exists?

TIA,

Lance
0
Reply Lance 2/23/2010 3:54:20 PM


0 Replies
528 Views

(page loaded in 0.088 seconds)

Similiar Articles:













7/23/2012 3:21:38 PM


Reply: