Art you are right! When the case of the Y is uncertain, whichC() provides no easy way (like find() function modifiers). However, I'm surprised that these indicators have uncertain case. It is the kind of problem we would remove as the data are loaded (the $upcase. informat is simple). I don't think we would recommend carrying information in the distinction between "y" and "Y". When case is uncertain, I would recommend (for clarity rather than peformance), a data step view to upper-case them all. data I_view / view= I_view ; set I_have ; array upp dfm: ; do over upp ; upp = upcase( upp ) ; end ; run ; For performance, alternatives come to mind, like Def_month = find( cats( of dfm: ), 'y', 'i' ) ; as in data want ; set I_have ; Def_month = find( cats( of dfm: ), 'y', 'i' ) ; retain dum 0 ; array bal(*) dum bal: ; if not def_month then call missing( def_balance ) ; else if max( bal( def_month ), bal( def_month+1 ) ) < 100 then def_balance = disc_amt ; else def_balance = bal( def_month+1 ) ; drop dum ; run ; I added DUM before the Balances in the array to remove exceptional handling when def_month=1
... View more