I have a proc sql like this one, the problem is that sas remove the zero before each cust_comp_key for example FR_C_00000242 is transforming to 242 but i want to keep the zeo before 242 ...
rsubmit;
data ca_m_service_2;
set ca_m_service;
num_compte = input(substr(CUST_COMP_KEY, 6),Best12.);
run;
endrsubmit;
Thanks for help
Edit,
I used this :
data ca_m_service_3;
set ca_m_service;
if length(substr(CUST_COMP_KEY, 6)) >= 8 then newsic=substr(CUST_COMP_KEY, 6);
else newsic=repeat('0',8-length(substr(CUST_COMP_KEY, 6))-1)||substr(CUST_COMP_KEY, 6);
It seems to work but now I need to transformr this vector to numeric, how can I do this ?