SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
thesasuser
Lapis Lazuli | Level 10

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

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.

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

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.

PaigeMiller
Diamond | Level 26

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.

--
Paige Miller

sas-innovate-white.png

Join us for our biggest event of the year!

Four days of inspiring keynotes, product reveals, hands-on learning opportunities, deep-dive demos, and peer-led breakouts. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1273 views
  • 2 likes
  • 3 in conversation