I am a rename and label like this
Data Stg_OUT6.PMCA_2019_relabel_for_merge (keep = Recipno19 TCN_2019 PERC_19 Dx1_2019-Dx9_2019 Totalwl_2019 icd10_code19 renal2019 endo2019 musculo2019 opthal2019
Complex_hlt_state_19);
Set Stg_OUT6.PMCA_2019_Merge_bsys_to_hlthste;
Rename Recipno = Recipno19;
Label Recipno='Recipno19';
Rename TCN = TCN_2019;
Label TCN='TCN_2019';
Rename Br_PERC = PERC_19;
Label Br_PERC = 'PERC_19';
Rename Dx1=Dx1_2019;
Label Dx1= 'Dx1_2019';
Rename Dx2=Dx2_2019;
Label Dx2= 'Dx2_2019';
Rename Dx3=Dx3_2019;
Label Dx3= 'Dx3_2019';
Rename Dx4=Dx4_2019;
Label Dx4= 'Dx4_2019';
Rename Dx5=Dx5_2019;
Label Dx5= 'Dx5_2019';
Rename Dx6=Dx6_2019;
Label Dx6= 'Dx6_2019';
Rename Dx7=Dx7_2019;
Label Dx7= 'Dx7_2019';
Rename Dx8=Dx8_2019;
Label Dx8= 'Dx8_2019';
Rename Dx9=Dx9_2019;
Label Dx9= 'Dx9_2019';
Rename Totalwl = Totalwl_2019;
Label Totalwl= 'Totalwl_2019';
Rename icd10codeset = icd10_code19;
Label icd10codeset = 'icd10_code19';
Rename renal = renal2019;
Label renal= 'renal2019';
Rename endo = endo2019;
Label endo= 'endo2019';
Rename musculo = musculo2019;
Label musculo= 'musculo2019';
Rename opthal = opthal2019;
Label opthal='opthal2019';
Rename cond_more_conservative = Complex_hlt_state_19;
Label cond_more_conservative = 'Complex_hlt_state_19';
run;
But this is the log error
Data Stg_OUT6.PMCA_2019_relabel_for_merge (keep = Recipno19 TCN_2019 PERC_19
733! Dx1_2019-Dx9_2019 Totalwl_2019 icd10_code19 renal2019 endo2019 musculo2019 opthal2019
ERROR: Either roots don't match or start suffix after end suffix.
734 Complex_hlt_state_19);
735 Set Stg_OUT6.PMCA_2019_Merge_bsys_to_hlthste;
736 Rename Recipno = Recipno19;
737 Label Recipno='Recipno19';
738 Rename TCN = TCN_2019;
739 Label TCN='TCN_2019';
740 Rename Br_PERC = PERC_19;
741 Label Br_PERC = 'PERC_19';
742 Rename Dx1=Dx1_2019;
743 Label Dx1= 'Dx1_2019';
744 Rename Dx2=Dx2_2019;
745 Label Dx2= 'Dx2_2019';
746 Rename Dx3=Dx3_2019;
747 Label Dx3= 'Dx3_2019';
748 Rename Dx4=Dx4_2019;
749 Label Dx4= 'Dx4_2019';
750 Rename Dx5=Dx5_2019;
751 Label Dx5= 'Dx5_2019';
752 Rename Dx6=Dx6_2019;
753 Label Dx6= 'Dx6_2019';
754 Rename Dx7=Dx7_2019;
755 Label Dx7= 'Dx7_2019';
756 Rename Dx8=Dx8_2019;
757 Label Dx8= 'Dx8_2019';
758 Rename Dx9=Dx9_2019;
759 Label Dx9= 'Dx9_2019';
760 Rename Totalwl = Totalwl_2019;
761 Label Totalwl= 'Totalwl_2019';
762 Rename icd10codeset = icd10_code19;
763 Label icd10codeset = 'icd10_code19';
764 Rename renal = renal2019;
765 Label renal= 'renal2019';
766 Rename endo = endo2019;
767 Label endo= 'endo2019';
768 Rename musculo = musculo2019;
769 Label musculo= 'musculo2019';
770 Rename opthal = opthal2019;
771 Label opthal='opthal2019';
772 Rename cond_more_conservative = Complex_hlt_state_19;
773 Label cond_more_conservative = 'Complex_hlt_state_19';
774 run;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
Any solution to this would be appreciated. I have done rename / label before but can't get around this error.
Thank you.
wlierman
The problem is "Dx1_2019-Dx9_2019". when using "-" all variables must have the same prefix and an increasing number after that.
The problem is "Dx1_2019-Dx9_2019". when using "-" all variables must have the same prefix and an increasing number after that.
Thank you andreas_lds. That got me rolling again.
wlierman
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.