|
|
|
|
1. Reading ASCII data with more than one line per record.
Data may be entered with more than one line per record. A brief description of such data comes from the Shock Research Unit at the University of Southern California, Los Angeles, California. Data on many physiological variables were collected successively in time on each patient. These data represent a special subset of the data that was extracted for the purpose of exercise. Initial measurements (measurements upon admission) and final measurements on the same variables (measurements just before death or discharge) were collected on 113 critically ill patients. We first save these data in an ASCII file called shock.txt on the C:\DATA directory, and read the data with the program dmes99p10.sas. The program illustrates:
Formats for categorical variables can be saved in a permanent SAS data set. We illustrate this here for the SHOCK data. The program dmes99p11.sas illustrates:
The formats can be read in with a CNTLIN option in PROC FORMAT. For example, in another SAS session, prior to using the formats with a data set, include the format procedure:
PROC FORMAT CNTLIN=old.datf;
where old specifies the path to the SAS format data set named datf.sd2.
There are two differences for formats for character variables:
Example:
PROC FORMAT;
VALUE $sex"F"="Female""M"=Male";
|
|
Produced and maintained by the
Dept
of BioEpi at UMASS |