Hey Null/Cynthia,
Just found this ::
http://support.sas.com/kb/33/814.html ... a basic solution to my problem. but not with proc transpose...but a different approach..kinda like it
Thanks to SAMPLES & SAS NOTES for the solution ::
data visits;
input dovisit date9. person_id sex :$1. nvisit :$1. fvisit :$1. avisit :$1.;
datalines;
18dec2007 444 M T F F
18dec2007 444 M T F F
10jan2007 365 M T F F
10jan2007 365 M T F F
01feb2007 212 F T T T
01feb2007 212 F T F T
;
run;
/*create a data set of the duplicates using DUPOUT= option */
proc sort data=visits dupout=visits_dup nodupkey;
by person_id;
run;
/* Create a macro variable with the variable names that are to */
/* be merged. The variables considered BY variables are excluded */
/* from going into the macro variable using the NOT IN operator. */
/* The resulting macro variable is in the format varname=varname_2 */ */
proc sql noprint;
select trim(name) || '=' || trim(name) || '_2'
into :varlist separated by ' '
from DICTIONARY.COLUMNS
WHERE LIBNAME EQ "WORK" and MEMNAME EQ "VISITS"
and upcase(name) not in ('PERSON_ID' 'DOVISIT' 'SEX');
quit;
/*Merge the two data sets using the macro variable to rename the */
/*common variables in the second (duplicates) data set. */
data merged;
merge visits visits_dup (rename=(&varlist));
by person_id;
run;
proc print;
run;