You probably could use the FIND function to find the string '_2018', and then delete everything before that.
%macro import(devoir1);
data _null_;
z=find("&devoir1",'_2018');
new_name=substr("&devoir1",1,z-1);
call symputx('new_name',new_name);
run;
FILENAME REFFILE "C:\mypath\&devoir1..csv";
PROC IMPORT
DATAFILE=REFFILE
DBMS=CSV
OUT=&new_name REPLACE;
GETNAMES=YES;
RUN;
%mend import;
%import (box_scores_2018)
... View more