Hi everybody! I am new here, I am a doctor and I use SAS to perform basic stat analysis. Right now I am having trouble editing a dataset, I am not sure how to solve the problem but I know there must be an easy way to do it, so I am asking for your help This is a sample of my dataset id exam1 exam2 exam3 exam4 1 1999 2007 2003 2000 2 2009 1985 2004 2001 3 2000 2001 2002 2003 What I want to do: to create a new variable 'firstexam' in which i have the name of the first exam and not the actual date my new dataset should be like this: id ... firstexam 1 exam1 2 exam2 3 exam1 if i use the min function I get id ... firstexam 1 1999 2 1985 3 2000 I know I could do it with a bunch of 'if' and 'then' but the editor would be so long and ugly.. I am sure there is an easier way to get the job done... Thanks a lot!
... View more