Bingo..

Bingo ?

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


> My error, Mike - my code should have read:
>
> SET VAR vdatum DATE = (IFNULL(.vdatum,(.#DATE -2),.vdatum))
>
>
> --- MikeB <[EMAIL PROTECTED]> wrote:
>
> > Albert,
> > This Fails if vDatum has not already been dimensioned.
> >
> > clear var vDatum  -- clear the variable
> > SET VAR vdatum = (IFNULL(.vdatum,(.#DATE - 2),.vdatum))
> > -ERROR- Column or variable vdatum not found (2515)
> > -ERROR- Expression cannot be evaluated. (2179)
> >
> > That was the reason for the method I posted.  It has Always been that if
good
> > programming practice wasn't employed as in setting the variable like:
> >
> > Set var vDatum SomeDataType
> >
> > Immediately prior to checking if it had a value of some kind, cause it would
> > always fail as above.  In the absence of good practice (which I confess I
> > ignored for many years), I just used the expression:
> >
> > SET VAR vcheckvar = .vTestVar
> > set var vCheckVar = (IFEQ('.',(SGET(.vcheckvar,1,1)), 'Not Exist',
'Exists'))
> >
> > to check for the leading dot if the variable had not been dimensioned and
> > being
> > too pigheaded to use the correct method as above...
> >
> >
>
>
> =====
> Albert Berry
> Management Consultant
> RR2 - 1252 Ponderosa Drive
> Sparwood BC, V0B 2G2
> Canada
> (250) 425-5806
> (250) 425-7259
> (708) 575-3952 (fax)
> [EMAIL PROTECTED]
>

Reply via email to