Hello,
I adding the variable ORGNL_SAS_DS_ROW_NBR and it works fine. But if we make a proc compare, we see that in the original dataset the lable are present and in the new dataset all the label seems to be blank. How to solve that issue ?
libname BANDE1 spde '/.../Temp/Alain/test/Classic/gc/auto';
libname BANDE2 spde '/.../Temp/Alain/test/Classic/gc/habi';
libname BANDE3 spde '/.../Temp/Alain/test/Classic/gc/entr';
libname BANDE4 spde '/.../Temp/Alain/test/Classic/gc2/auto';
libname BANDE5 spde '/.../Temp/Alain/test/Classic/gc2/habi';
libname BANDE6 spde '/.../Temp/Alain/test/Classic/gc2/entr';
%let co=gc;
%let moisc=feb;
%let year=2025;
Data BANDE4.&CO._AUTO_PRM&MOISC.&YEAR. ;
ORGNL_SAS_DS_ROW_NBR=_N_;
set BANDE1.&CO._AUTO_PRM&MOISC.&YEAR. ;
run;
/****** Bande2 for Property *****/
Data BANDE5.&CO._PROP_PRM&MOISC.&YEAR. ;
ORGNL_SAS_DS_ROW_NBR=_N_;
set BANDE2.&CO._PROP_PRM&MOISC.&YEAR. ;
run;
/****** Bande3 for Enterprise *****/
data BANDE6.&CO._CNA_PRM&MOISC.&YEAR. ;
ORGNL_SAS_DS_ROW_NBR=_N_;
set BANDE3.&CO._CNA_PRM&MOISC.&YEAR. ;
run;
/****** The proc compare steps *********/
proc compare base=bande1.&CO._AUTO_PRM&MOISC.&YEAR. compare=BANDE4.&CO._AUTO_PRM&MOISC.&YEAR.
listvar;
run;
proc compare base=bande2.&CO._prop_PRM&MOISC.&YEAR. compare=BANDE5.&CO._prop_PRM&MOISC.&YEAR.
listvar ;
run;
proc compare base=bande3.&CO._CNA_PRM&MOISC.&YEAR. compare=BANDE6.&CO._CNA_PRM&MOISC.&YEAR.
listvar ;
run;
Looks like you turned off the LABEL option.
Example:
data class;
set sashelp.class;
label name='Student Name';
run;
options nolabel;
data class2; set class; run;
options label;
data class3; set class; run;
proc compare data=class compare=class2;
run;
proc compare data=class compare=class3;
run;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.