If you just want to get rid of the warning "<WARNING> NULL value assigned to a 
variable with no INDICATOR variable (2513)" then a single var is fine. But, if 
you want to actually use the indicator variables to determine if data is null 
then you need different names.

For example:

SELECT Col1,Col2,Col3 INTO v1 IND vI1,v2 IND vI2,v3 IND vI3 FROM Table

If all of the vars are NOT NULL then  (.v1+.v2+.v3)=0.
If any of the vars are NOT NULL then (.v1*.v2*.v3)=0.

If all of the vars are NULL then (.v1*.v2*.v3)<>0.
If any of the vars are NULL then (.v1+.v2+.v3)<>0.


Regards,

Stephen Markson
The Pharmacy Examining Board of Canada
416.979.2431 x251

From: [email protected] [mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Wednesday, August 29, 2012 4:07 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: INDICATOR variables

I always use the same name for every indicator variable.  The datatype is 
always integer so no conflict there.  Unless you plan on checking the indicator 
variable by name, I know of no reason why the names should be unique.

Karen


In a message dated 8/29/2012 3:04:02 PM Central Daylight Time, 
[email protected] writes:

When using a SELECT . . .  INTO  . . . .INDICATOR statement can just one 
generic INDICATOR variable be used for each value or should there be a unique 
INDICATOR variable for each value?

For example is it OK to do this:  SELECT custname,custcity,custzip INTO vname 
INDICATOR vind,vcity INDICATOR vind,vzip INDICATOR vind . . . .

Or is this the best way:  SELECT custname,custcity,custzip INTO vname INDICATOR 
vnameind, vcity INDICATOR vcityind,vzip INDICATOR vzipind . . . .

I'm guessing unique may be better but can a generic one be used?

Any and all guidance is greatly appreciated.

Thanks.

Reply via email to