Since I like to avoid subroutines when I can, this is how I would do it (using Perry's sample data slightly modified):
EVENTCODE P]B]F]B]R And EVENTSTATUS A-T]B-T]FP-T]K-P]A-P TRIM(IFS(EQS(EVENTCODE,REUSE('B')),EVENTSTATUS,REUSE('')),@VM) Which returns all values for EVENTCODE 'B', else empty. My concern with using INDEX is that you usually end up with only the first occurence in the results. Sincerely Best Regards, Richard Lewis IBM Certified Solutions Expert -- U2 Family Application Development Sr. Programmer/Analyst Nu Skin Enterprises --- On Fri 08/10, Boydell, Stuart < [EMAIL PROTECTED] > wrote: From: Boydell, Stuart [mailto: [EMAIL PROTECTED] 001 I 002 MV.ATTRIBUTE.TO.SEARCH;EQS(REUSE('SEARCH.STRING'),@1);IF SUM(@2)THEN @1<1,(INDEX(@2,1,1)+1)/2> ELSE 'NOT FOUND' 003 ... _______________________________________________ No banners. No pop-ups. No kidding. Make My Way your home on the Web - http://www.myway.com ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/