Hi all; I ran the code below using OnDemand 9.4 (TS1M4), but the first three observations did not pull over the values (see screenshot). I double checked to make sure the values themselves weren't missing. There isn't anything that stands out to me in the log, either. I'm not sure how to correct this; any ideas? DATA WORK.Vitals_ST (LABEL = 'Vital Signs');
LENGTH SSN $11
VisitDt 8
HtIn 8
WtLb 8
SBP 8
DBP 8;
SET STATE_VITALS_0 - STATE_VITALS_4 (RENAME = (SSN = SSN_Old));
SSN = COMPRESS(SSN_Old, '.');
RETAIN HtIn WtLb SBP DBP;
LABEL SSN = "Social Security Number"
VisitDt = "Visit Date"
HtIn = "Height (In)"
WtLb = "Weight (Lb)"
SBP = "Systolic BP (mmHg)"
DBP = "Diastolic BP (mmHg)";
IF Measure = 'Height (In)' THEN HtIn = Value;
ELSE IF Measure = 'Weight (Lb)' THEN WtLb = Value;
ELSE IF Measure = 'Systolic BP' THEN SBP = Value;
ELSE DBP = Value;
VisitDt = ApptDate;
First = SUBSTR (SSN, 1, 3);
Middle = SUBSTR (SSN, 4, 2);
Last = SUBSTR (SSN, 6);
SSN = CATS (First,'-',Middle,'-',Last);
SSN_Old = SSN;
DROP Measure VALUE First Middle Last;
FORMAT VisitDt DATE9.;
RUN;
PROC SORT DATA = WORK.Vitals_ST;
BY SSN VisitDt;
RUN;
PROC PRINT DATA = WORK.Vitals_ST LABEL;
VAR SSN VisitDt HtIn WtLb SBP DBP;
RUN;
PROC CONTENTS DATA = WORK.Vitals_ST ORDER = VARNUM;
RUN;
*****LOG*****;
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
70
71 DATA WORK.Vitals_ST (LABEL='Vital Signs');
72 LENGTH SSN$11
73 VisitDt8
74 HtIn8
75 WtLb8
76 SBP8
77 DBP8;
78
79 SET UTAH_VITALS_0 - UTAH_VITALS_4 (RENAME =(SSN= SSN_Old));
80 SSN = COMPRESS(SSN_Old, '.');
81
82 RETAIN HtIn WtLb SBP DBP;
83
84 LABELSSN= "Social Security Number"
85 VisitDt= "Visit Date"
86 HtIn= "Height (In)"
87 WtLb= "Weight (Lb)"
88 SBP= "Systolic BP (mmHg)"
89 DBP= "Diastolic BP (mmHg)";
90
91 IF Measure = 'Height (In)' THENHtIn= Value;
92 ELSE IF Measure = 'Weight (Lb)' THENWtLb= Value;
93 ELSE IF Measure = 'Systolic BP' THENSBP= Value;
94 ELSE DBP = Value;
95
96 VisitDt= ApptDate;
97 First= SUBSTR (SSN, 1, 3);
98 Middle= SUBSTR (SSN, 4, 2);
99 Last= SUBSTR (SSN, 6);
100 SSN= CATS (First,'-',Middle,'-',Last);
101 SSN_Old=SSN;
102
103 DROP Measure VALUE First Middle Last;
104
105 FORMATVisitDt DATE9.;
106 RUN;
NOTE: There were 748 observations read from the data set WORK.UTAH_VITALS_0.
NOTE: There were 680 observations read from the data set WORK.UTAH_VITALS_1.
NOTE: There were 692 observations read from the data set WORK.UTAH_VITALS_2.
NOTE: There were 648 observations read from the data set WORK.UTAH_VITALS_3.
NOTE: There were 588 observations read from the data set WORK.UTAH_VITALS_4.
NOTE: The data set WORK.VITALS_ST has 3356 observations and 8 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.01 seconds
system cpu time 0.01 seconds
memory 2433.50k
OS Memory 33724.00k
Timestamp 11/11/2020 11:06:11 PM
Step Count 431 Switch Count 2
Page Faults 0
Page Reclaims 349
Page Swaps 0
Voluntary Context Switches 9
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 528
107
108 PROC SORT DATA = WORK.Vitals_ST;
109 BYSSN VisitDt;
110
111 RUN;
NOTE: There were 3356 observations read from the data set WORK.VITALS_ST.
NOTE: The data set WORK.VITALS_ST has 3356 observations and 8 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 1722.81k
OS Memory 33204.00k
Timestamp 11/11/2020 11:06:12 PM
Step Count 432 Switch Count 2
Page Faults 0
Page Reclaims 143
Page Swaps 0
Voluntary Context Switches 11
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 520
112
113 PROC PRINT DATA = WORK.Vitals_ST LABEL;
114 VARSSN VisitDt HtIn WtLb SBP DBP;
115
116 RUN;
NOTE: There were 3356 observations read from the data set WORK.VITALS_ST.
NOTE: PROCEDURE PRINT used (Total process time):
real time 4.84 seconds
user cpu time 4.85 seconds
system cpu time 0.00 seconds
memory 3121.78k
OS Memory 32680.00k
Timestamp 11/11/2020 11:06:16 PM
Step Count 433 Switch Count 0
Page Faults 0
Page Reclaims 151
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 7
Block Input Operations 0
Block Output Operations 2432
117
118 PROC CONTENTS DATA = WORK.Vitals_ST ORDER = VARNUM;
119
120 RUN;
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.05 seconds
user cpu time 0.05 seconds
system cpu time 0.00 seconds
memory 1698.68k
OS Memory 33196.00k
Timestamp 11/11/2020 11:06:16 PM
Step Count 434 Switch Count 0
Page Faults 0
Page Reclaims 135
Page Swaps 0
Voluntary Context Switches 6
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 40
121
122 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
133
... View more