Researchers commonly express scepticism about using observational data to estimate the effect of a treatment on an outcome the treatment is intended to affect. In this paper, we consider using data from the Multicenter AIDS Cohort Study (MACS) to determine whether zidovudine prevents the development of Kaposi's sarcoma among HIV-positive gay men. Several methodologic issues common to observational data characterized the study: information on potentially important confounders was missing at some study visits; investigators did not always know the time of changes in treatment level, nor the value of confounders at that time, and the censoring process depended strongly on time-varying covariates related to outcome. We describe application to our data of Robins' paradigm for defining, modelling and estimating the effect of a time-varying treatment and show how to modify his approach to deal with the methodologic issues we have mentioned. Further, we demonstrate that relative risk regression is less well equipped to deal with these issues. We compare our results to the findings from randomized trials, and conclude that observational studies may sometimes be useful in evaluating the effect of treatment on an intended outcome.