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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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