In reply to Chris Hemedinger.

I ended up doing this (when running as a SP, it uses _PROGRAM):
%if %symexist(_clientprojectpath) %then %let inpath = &_clientprojectpath;
%if %symexist(_PROGRAM) %then %let inpath = &_PROGRAM;