Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Check is var exists and create it if it does not

2 views
Skip to first unread message

Lance

unread,
Feb 23, 2010, 10:54:20 AM2/23/10
to
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 new messages