How about:
set var vtestvar text=null
set var vCheckVar = (ifexists(.vTestVar,'Exists','Sorry'))
show var vCheckVar
return

Bernie Lis

----- Original Message ----- 
From: "MikeB" <[EMAIL PROTECTED]>
To: "RBG7-L Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 17, 2004 4:31 PM
Subject: [RBG7-L] - RE: Cheking for existans of a variable


> -- toggle the remarks on the next two lines to see the result
> --CLEAR VAR vtestvar
> set var vtestvar text = null
> SET VAR vcheckvar = .vTestVar
> set var vCheckVar = (IFEQ('.',(SGET(.vcheckvar,1,1)), 'Not Exist',
'Exists'))
> PAUSE 2 USING .vcheckvar
> RETURN
>
> ----- Original Message ----- 
> From: "Gunnar Ekblad" <[EMAIL PROTECTED]>
> To: "RBG7-L Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, August 17, 2004 11:38 AM
> Subject: [RBG7-L] - RE: Cheking for existans of a variable
>
>
> Thanks Buddy
> My issue was really in DOS. Up to 7.0 the variable did not need be
> created it tested positive if the value was NULL and also if the
> variable was not there, but DOS 7.1 works like win version 6.5++ and 7.1
> Any way I found a workaround so I stay happy! My workaround is 5 lines
> of code so if anyone has a smarter way please feel free to enlighten me.
>
> Gunnar Ekblad
>
>
> -----Ursprungligt meddelande-----
> Fr�n: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] F�r Walker, Buddy
> Skickat: den 17 augusti 2004 13:29
> Till: RBG7-L Mailing List
> �mne: [RBG7-L] - RE: Cheking for existans of a variable
>
> Gunnar
>   I've always had to define the variable first even in 6.5++.
>
>   SET VAR vdatum DATE
>
>   IF vdatum IS NULL THEN
>    SET V vdatum = (.#DATE - 2)
>   ENDIF
>
> Buddy
>
>
>
>
> -----Original Message-----
> From: Gunnar Ekblad [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 17, 2004 4:28 AM
> To: RBG7-L Mailing List
> Subject: [RBG7-L] - Cheking for existans of a variable
>
>
> In the past, prior to 7.1 (DOS and Windows) I used to have this
> construction to check the existans of variable.
>
> IF vdatum IS NULL THEN
>   SET V vdatum = (.#DATE - 2)
> ENDIF
>
> That way I could default my variable to the existing value, or if there
> was no value to whatever I decide to.
>
> How do I go about to the same thing in 7.1?
>
> Gunnar Ekblad
>
>

Reply via email to