Hi Thank you for taking time to help me. The put put was like this after I run the codes you sent to me. [cid:image001.png@01D5D5ED.3F031630] The log says this NOTE: The data set WORK.HAVE has 19 observations and 5 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds 926 ; 927 run; 928 proc sort data=have; 929 by IncidentID Specimen CollDate; 930 run; NOTE: There were 19 observations read from the data set WORK.HAVE. NOTE: The data set WORK.HAVE has 19 observations and 5 variables. NOTE: PROCEDURE SORT used (Total process time): real time 0.01 seconds cpu time 0.00 seconds 931 data want; 932 set have; 933 by IncidentID Specimen; 934 length Site_tested $40 Site_infected $40 days $3; 935 retain save_colldate Site_tested Site_infected Days save_result; 936 label days = "Days between Neg and Pos test"; 937 938 if first.IncidentID then do; 939 site_tested = ' '; 940 Site_infected = ' '; 941 end; 942 943 if first.Specimen then do; 944 save_colldate = colldate; 945 if Site_tested = ' ' then Site_tested = Specimen; 946 else site_tested = catx('&',site_tested,Specimen); 947 save_result = result; 948 if locase(result) = 'positive' then do; ------ 68 ERROR 68-185: The function LOCASE is unknown, or cannot be accessed. 949 if site_infected = ' ' then site_infected = Specimen; 950 else site_infected = catx('&',site_infected, Specimen); 951 end; 952 end; 953 else if result ne save_result 954 then days = put(colldate - save_colldate, 3.); 955 else days = 'NA'; 956 957 if last.IncidentID then output; 958 run; NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column). 948:25 NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set WORK.WANT may be incomplete. When this step was stopped there were 0 observations and 10 variables. NOTE: DATA statement used (Total process time): real time 0.06 seconds cpu time 0.06 seconds 959 data want; 960 set have; 961 by IncidentID Specimen; 962 length Site_tested $40 Site_infected $40 days $3; 963 retain save_colldate Site_tested Site_infected Days save_result; 964 label days = "Days between Neg and Pos test"; 965 966 if first.IncidentID then do; 967 site_tested = ' '; 968 Site_infected = ' '; 969 end; 970 971 if first.Specimen then do; 972 save_colldate = colldate; 973 if Site_tested = ' ' then Site_tested = Specimen; 974 else site_tested = catx('&',site_tested,Specimen); 975 save_result = result; 976 if locase(result) = 'positive' then do; ------ 68 ERROR 68-185: The function LOCASE is unknown, or cannot be accessed. 977 if site_infected = ' ' then site_infected = Specimen; 978 else site_infected = catx('&',site_infected, Specimen); 979 end; 980 end; 981 else if result ne save_result 982 then days = put(colldate - save_colldate, 3.); 983 else days = 'NA'; 984 985 if last.IncidentID then output; 986 run; NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column). 976:25 NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set WORK.WANT may be incomplete. When this step was stopped there were 0 observations and 10 variables. WARNING: Data set WORK.WANT was not replaced because this step was stopped. NOTE: DATA statement used (Total process time): real time 0.04 seconds cpu time
... View more