OK Ian, no batch, then SYSPROCESSNAME is useless.
If your running in a interactive session, try looking into the DICTIONARY.EXTFILES table, that lists all external files opened in your session (including your scripts).
Your script should be listed there, you only have to find a logical manner to pick the right entry.
_data null_'s tip seems also a good solution, you should give it a try.
Greetings from Portugal.
Daniel Santos at
www.cgd.pt.
> Thanks for the info, I have already looked at the
> automatic macro variables by running a %put _all_;
> and it never returned any value which looked
> appropriate.
>
> I am running PC SAS locally on a windows environment,
> so I am not running it in a batch process.