You have to keep in mind that X 'cd ....'; will not change the working directory of the SAS workspace server, but the working directory of the shell that the workspace server invokes to execute what was given to the X statement. Once this is complete, the shell terminates and the cd is history. If you need to change to a directory in order to execute something there, you need to do it in one action: X 'cd xxxx;do-whatever-you-need-to-do'; That way do-whatever-you-need-to-do actually runs in xxxx. IMO also it is a design flaw that SAS does not (per default) change to the user's home directory before invoking the workspace server
... View more