Go Back   Rhinocerus > Newsgroup > Newsgroup comp.soft-sys.sas

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 05-21-2005, 12:54 PM
Ben
Guest
 
Posts: n/a
Default How to translate.....

Hi,

I want to translate lab's drug code in lab data into its full name based on
following med data info.

varibales:
ondrug: indicator for drug on use.
sub: non-protocol visit
repdt: lab result report date
visdt: visit date
..........

in final dataset, in sub-visit 0 code d should be translated into dnam1
in sub-visit 3 code d should be traslated into dnam2


Thanks.


************************************************** ***********;
data med;
input visn sub visdt: date7. drgnam$ ondrug;
datalines;
1 0 12apr03 lnam1 1
1 0 12apr03 dnam1 1
1 2 14apr03 lnam1 1
1 2 14apr03 dnam1 0
1 2 14apr03 dnam2 1
2 1 05may03 lnam1 1
2 1 05may03 dnam2 1
........
;
run;

data lab;
input visn sub repdt: date7. drgcode $ ;
datalines;
1 0 13apr03 l
1 0 13apr03 d
1 3 04may03 l
1 3 04may03 d
...........
;
run;
************************************************** ***********;
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: use of tranwrd and translate on variables or in a loop Howard Schreier Newsgroup comp.soft-sys.sas 1 07-28-2008 10:58 AM
using tranwrd and translate on variables or in a loop n Newsgroup comp.soft-sys.sas 0 07-15-2008 11:21 AM
Re: Translate SQL procedure using PROC SQL Sigurd Hermansen Newsgroup comp.soft-sys.sas 0 01-14-2008 07:32 PM
Re: Translate SQL procedure using PROC SQL Gregg Snell Newsgroup comp.soft-sys.sas 0 01-14-2008 03:31 PM
Re: Another use of TRANSLATE Jack Hamilton Newsgroup comp.soft-sys.sas 0 11-09-2004 04:02 PM



All times are GMT. The time now is 03:00 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.