In our environment SAS 9.4 is installed on Windows server.
User's run the SAS code using SAS EG installed on their desktop.
in the sasv9.cfg SASINITIALFOLDER is set to C:\sas\config\Lev1.
I see that there is Working directory (https://blogs.sas.com/content/sgf/2018/05/18/how-to-change-your-working-directory-for-sas-with-the-d... )
Can any body enlighten on the difference between these two.
The current working directory is a normal computer concept (applies to both Windows and Unix). It is the answer to the question "If I reference a file without any path specified what path will be used?".
The SASINITIALFOLDER is a SAS setting that is used to determine the current working directory that will be in force when the SAS session starts.
So when your SAS sessions starts the current working directory will be same as the SASINITIALFOLDER setting. But you could then change it by running the cd operating system command or the SAS function mentioned in the article you linked.
The current working directory is a normal computer concept (applies to both Windows and Unix). It is the answer to the question "If I reference a file without any path specified what path will be used?".
The SASINITIALFOLDER is a SAS setting that is used to determine the current working directory that will be in force when the SAS session starts.
So when your SAS sessions starts the current working directory will be same as the SASINITIALFOLDER setting. But you could then change it by running the cd operating system command or the SAS function mentioned in the article you linked.
DLGCDIR allows you to change the working folder within a SAS program, many times if you want (and it also allows you to query what folder is the working folder). SASINITIALFOLDER can only be set at the launch of SAS via the CONFIG file or via invocation options.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.