BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
thesasuser
Pyrite | Level 9

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 2025: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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