I have a constant defined in a stage variable that is a dynamic array. I need to compare an incoming field value to the content of that array and return the element number that corresponds to it. LOCATE works great for this - as long as routine code is involved.
Example:
Array = Convert(","@FM,"A,D,C,B,J,Z")
An input value of "C" should return a 3.
Since both LOCATE and FIND require a SETTING clause, they don't seem to be appropriate for use in a derivation... or am I missing something here? I'd really rather not write a routine to do this if I can help it, I'd rather do it directly in the derivation.
I don't really care if my array to check against is dynamic or dimensioned, whatever works for this is fine. Any suggestions?
