|
I would do something more like:
proc FORMAT cntlout = Mnfr
(keep = Start Label
rename = (Start = Value));
value $Mnfr
'01' = 'Mnfr One '
'02' = 'Mnfr Two '
'03' = 'Mnfr Three'
'04' = 'Mnfr Four '
;
proc FORMAT cntlout = chk
(keep = Start Label
rename = (Start = Value));
value $chk
'00' = 'No '
'01' = 'Yes'
;
run;
Then the SQL:
proc sql;
select test.*,
Mnf.Value as mlabel,
chk1.Value as QC1label,
chk2.Value as QC2label
from test left join Mnf on Mnfr=Value
left join chk as chk1 on QC1 = chk1.Value
left join chk as chk2 on QC2 = chk2.Value
;
Or as a SQL / SAS hybrid something like:
proc sql;
select test.*,
put(Mnfr,$mnfr.) as mlabel,
put(QC1 ,$chk.) as QC1label,
put(QC2 ,$chk.) as QC2label
from test
;
Andy Kowalczyk
|