Program to Create the SAS Data Set LAB_TEST

LIBNAME CLEAN "C:\CLEANING";

DATA CLEAN.LAB_TEST;
   INPUT @1  PATNO    $3.
         @4  LAB_DATE DATE9.
         @13 WBC      5.
         @18 RBC      4.;
   LABEL  PATNO    = 'Patient ID'
          LAB_DATE = 'Date of Lab Test'
          WBC      = 'White Blood Cell Count'
          RBC      = 'Red Blood Cell Count';
   FORMAT LAB_DATE MMDDYY10.;
DATALINES;
00115NOV1998 90005.45
00319NOV1998 95005.44
00721OCT1998 82005.23
00422DEC1998110005.55
02501JAN1999 82345.02
02210OCT1998 80005.00
;

Get Cody’s Data Cleaning Techniques Using SAS® Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.