I don't see a variable &path. I do see &pathx
url= "&pathx.?restype=directory&include=timestamps&comp=list"
I also do not see where &path or &pathx is set. So without that bit of info I would say that is the likely problem: the macro variable with the path is not assigned, or assigned incorrectly in batch mode.
Where is the LOG created when you run this? I see several things that SAS might complain about as undefined macro variables that are URL elements.
... View more