Using an array to detect specific difference in numeric value

10 pts.
Tags:
Array processing
SAS
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!!!

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following