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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.