Is it possible to use an array to detect when a character value changes in one variable (ex: act_code = COFF COFF NC01) and then assign a value from another existing variable to a new variable? For example, whenever a change is encountered (COFF to NC01), I need SAS to use the corresponding account_time value for NC01 and assign that value to the new variable start_time (if NC01 then start_time = act_time).
act_code act_time start_time
COFF 65123
COFF 65802
NC01 75243 75243
NC01 75624
NC01 80214
CVIR 80543 80543
This is a tough one for me!!!
Software/Hardware used:
ASKED:
May 7, 2008 3:31 PM
UPDATED:
May 7, 2008 3:38 PM