I have a data file that looks like this:
001 Mayo Clinic 120 78 7 15
Patient has had a persistent cough for 3 weeks
023 Mayo Clinic 157 72 10 2
Patient complained of ear ache
064 HMC 201 59 . .
Patient left against medical advice
003 HMC 166 58 8 15
Patient placed on beta-blockers on 7/1/2006
I find the task of reading this in SAS basically impossible. And no, in this case, reformatting the data file is out of the question. So let me explain what you are looking at here:
Each object has two rows of data. First line -
topic number / clinic / wt / hr / dx / sx (don't worry about what the numbers mean, it doesn't matter).
The second line is the text, which is basically a note containing additional information related to the subject whose data are indicated in the previous line. So the lines are:
001 Mayo Clinic 120 78 7 15
Patient has had a persistent cough for 3 weeks
. Subject 001. SAS. ; - , , , SAS . , :
data ClinData;
infile "&wdir.clinic_data.txt";
retain patno clinic weight hr dx sx exinfo;
input patno clinic $1. @;
if clinic='M' then
input patno @5 clinic $11. weight hr dx sx / @1 exinfo $30.;
else if clinic='H' then
input patno @5 clinic $3. weight hr dx sx / @1 exinfo $30.;
run;
:
http://i61.tinypic.com/2uswl90.png
.
.
-, ('patno') . ?
-, "" "". SAS , , .
-, "exinfo" . SAS . , , 30 , .
? SAS . , , , . , /; , . , , , , .