Question

  Asked: May 7 2008   3:31 PM GMT
  Asked by: Risk analyst


Using an array to detect specific difference in numeric value


Array processing, SAS arrays

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!!!

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


Start this Answer and Earn your Knowledge Points!

By clicking "Create Answer", you can write the answer to this question that can be improved upon by your peers using the Answer Wiki.

Browse more Questions and Answers on Development and DataManagement.

Looking for relevant Development Whitepapers? Visit the SearchSQLServer.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register