This is how I am begining the file:
------------------------------------------
SET mess OFF
SET VAR vtag INT
IF vtag IS NULL THEN
 DIALOG 'Enter Tag Number' vResponse vendkey 1
 SET VAR vtag =(INT(.vresponse))
ENDIF
... other stuff that requires .vtag ...

------------------------------------------
I havn't had a use for the indicator variables yet. I don't even use them in a FETCH statement. So I just turned MESS OFF I no more problem.


Jim Limburg wrote:

OK, I'll bite

How are you using the variable, or declaring it before hand. I only know
of having to use indicator variables if I am pulling the variable information
from a tables column info..


Like:
SELECT columnname INTO v1 INDICATOR vm_i1 FROM tablename +
WHERE columnname = .var_value AND LIMIT = 1

Interesting
Jim

James Hageman wrote:

I like that, short and sweet. However it does give a warning about setting the variable to NULL without indicator variable or something, but it still works and holds the assigned value if it is defined. Cool
Thanks Jim
James



Jim Limburg wrote:


James

Just use

SET VAR v1 TEXT

... or whatever datatype is is delcared to as before. Be sure to
keep the datatypes the same though..

Don't set it to null. Doing it this way will not clear the variables
setting if it already exist, but well set it to NULL if it doesn't exist.


Jim Limburg



James Hageman wrote:

I want to be able to find out if a variable exists and if not to create it and then pronpt the user to assign a value to it.

I thought I could do something like :

IF (IFEXIST(v1,.v1,NULL)) IS NULL THEN
     DIALOG 'Enter value for v1' v1 vEndKey 1
ENDIF

But I get an error message telling me v1 doesnt exist, Right! I know.







Reply via email to