Check if a variable has been defined

ss_kiran

Member
Hi All,
i have requirement like this , i have many .p programs which are using a .i program and in the .i i want to do some thing like this. I want to check if a variable is defined in the .p, if not then define the variable else do nothing.

Thanks in advance

kiran
 
.p
&global-define variableISDefined true
define variable abc as integer no-undo.
...

.i
&if defined(variableISDefined) = 0 &then
define variable abc as integer no-undo.
&endif
...


Hope this helps

Jon
 

ss_kiran

Member
Hi Jon,
Thanks for your reply, I wanted to know if i can check without using &global-define.

Thanks In Advance.
 
Top