In reply to Jim Barbour.

Hi Jim, You are correct in that the DLGCDIR function does not have any affect when using "ls -l" to pipe a directory listing into an INFILE. At first glance, I would have thought that it would apply, but when I test it here, it actually does not apply in this case. To change the default directory used by INFILE "ls -l", I first need to change the default directory via the X command, for example:
X "cd /tmp";
But in order to use the X command in SAS, you will have to make sure that your invocation of SAS is configured to allow the X command. But as far as the original question is concerned, let me research it a bit more from my side. Regards, Martin