Help on decide statement

Can someone help interpret this for me:
DECIDE ON EVERY VALUE OF TRANS.CAT(*)
VALUE ‘D’

VALUE ’ M’

I’m unclear about how the (*) affects the statement.

TIA,
Jennifer

Think of it this way:

IF CAT(*) = 'D'

is the same as:

IF CAT(1) = 'D'
OR CAT(2) = 'D'
OR CAT(3) = 'D'
...

i.e. If any occurence in the array matches ‘D’, the expression evaluates to TRUE.

You have to be careful with NE:

IF CAT(*) NE 'D'

is the same as:

IF CAT(1) NE 'D'
OR CAT(2) NE 'D'
OR CAT(3) NE 'D'
...

i.e. If any occurence in the array does not match ‘D’, the expression is TRUE. The only time where this evaluates to FALSE is if every occurence in the array contains ‘D’.

Excellent example! Thanks!!