Hi again,

Here is the code and the log (now giving another error):

code-------------
data _null_;
length name $ 255;
name = dequote(&_clientprojectpath);
call scan (name,-2,cutoff,length,'\');
path = substr(name,1,cutoff-1);
call symput('libpath',path);
run;
%put &libpath;
libname source "&libpath.";

filename in "&libpath\180106_imaging_brain\test1.tab";
proc import
datafile=in
dbms=tab replace;
getnames=yes;
run;
-------------

log (part of)-------------
NOTE: Libref SOURCE was successfully assigned as follows:
Engine: V9
Physical Name: C:\000000_MyStuff\Experiments 1000-1099\E1056_LipidImaging_with_shane
29
30
31 filename in "&libpath\180106_imaging_brain\test1.tab";
WARNING: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation
marks.
WARNING: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation
marks.
ERROR: Invalid physical name.
ERROR: Error in the FILENAME statement.
32 proc import
33 datafile=in
34 /* remainder of step */
35 dbms=tab replace;
ERROR: Output SAS data set must be provided.
NOTE: The SAS System stopped processing this step because of errors.
-------------

When I locate the absolute path (of the .egp file) with your %sysfunc example, then I have no problem executing the PROC IMPORT step (with datafile= "&libpath\test1.tab").
Why is this now different?

Thank you very for your help!

C.