256 *********************************************; 257 * Clinical data set questions: *; 258 * VI. Data Processing *; 259 *********************************************; 260 libname course 'c:\My Documents\My SAS Files\sasmanual\course'; NOTE: Libref COURSE was successfully assigned as follows: Engine: V9 Physical Name: c:\My Documents\My SAS Files\sasmanual\course 261 262 data diab; 263 set course.test4 end=last; 264 array dx(10) diag01-diag10; 265 retain countdiab count_rec 0; 266 finddiab = 0; 267 do i=1 to 10; 268 if substr (dx(i),1,3)='250' then do; 269 finddiab=1; 270 countdiab=countdiab+1; 271 end; 272 end; 273 if finddiab = 1 then count_rec = count_rec +1; 274 if last then output; 275 label countdiab = 'Number of Diabetic Diagnostic Codes in the Data' 276 count_rec = 'Number of records with a diagnostic code for diabetes'; 277 run; NOTE: There were 5000 observations read from the data set COURSE.TEST4. NOTE: The data set WORK.DIAB has 1 observations and 50 variables. NOTE: DATA statement used (Total process time): real time 0.39 seconds cpu time 0.06 seconds 278 279 proc print data=diab label; 280 var countdiab count_rec; 281 title 'Total Number of Diabetes Diagnoses and Hospital Records with Diabetes Diagnosed'; 282 run; NOTE: There were 1 observations read from the data set WORK.DIAB. NOTE: PROCEDURE PRINT used (Total process time): real time 0.00 seconds cpu time 0.00 seconds