It is crucial for a successful clinical trial that the data gathered have a high level of reliability and completeness. This paper reviews some problems of data management and describes the COMPACT computer package which has developed to deal with such problems. The package allows range and consistency checks and can monitor complex follow-up schedules. A unique feature of the package is a PROBLEMS file which tracks any outstanding queries which may have arisen while checking the data. The ability to monitor drug dosages and to signal deviations from the trial protocol is of particular value. COMPACT has the syntax necessary for extracting summary measures from repeated follow-up forms or progress reports, and creating a "fiat" file for transfer to SPSS, SAS, P-STAT, BMDP and MINITAB for the statistical analysis.