BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
texasmfp
Lapis Lazuli | Level 10

I have two versions of SAS, each located on different drives.  When I submit a program in batch mode, it executes using the SAS installed on the C drive. I submit it by right-clicking on the prog in a Explorer window and selecting Batch Submit with SAS 9.4.

 

I want the submitted job to run using the SAS installed on my E drive, because it runs much faster.  There is no such option when right-clicking.  Is there another way to submit it so that I can direct it to use the SAS installed on the E Drive?  Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Anand_V
Ammonite | Level 13
Can you go back to the environmental variables window and under that select the 'path' variable under System variables and click on Edit..
It should list you all the paths set on your machine.

Check for something like C:\...\SASFoundation\9.4 and Edit those to E drive.

Take a snap of the original path settings, in-case you want to revert it back to the original paths later.

View solution in original post

10 REPLIES 10
SASKiwi
PROC Star

Just use a command line to run the right executable: E:\MySASInstallFolder\sas.exe.

texasmfp
Lapis Lazuli | Level 10
thanks SASKiwi. after the sas.exe command, what is the syntax to call the specific program? and, can I call multiple programs after the sas.exe or do I need to repeat that for each program I call? Thanks
Anand_V
Ammonite | Level 13
I think you can use the below syntax:

....\sas.exe -sysin \..\..\<path-to-your-program.sas>
texasmfp
Lapis Lazuli | Level 10
I tried that, but every path, folder, and called filename has spaces between the words. I spent 1/2 hour trying to rename everything and it still did not work because within the program's called programs are path and filenames with spaces. Ughh. Why can't SAS get over spaces in filename? Too much work to rename everything.
Anand_V
Ammonite | Level 13
Can you try if it works with quotes?

....\sas.exe -sysin "\..\..\<path-to-your-program.sas>"
Anand_V
Ammonite | Level 13
Is there a system environment variable pointing it to the SAS installed in C drive? If yes, you can change that to point it to E drive.
texasmfp
Lapis Lazuli | Level 10
If there is, I haven't the foggiest idea of where that is. Do you? (Windows 10 64-bit)
Anand_V
Ammonite | Level 13

Two ways to check your PATH environment variable in windows.

1 -> Open CMD and enter the command 'path' and hit enter. It will show you if there is an entry for SAS executable there.

2-> Right click on MyComputer and click properties. Under system click on advanced system settings which should open a window 'system properties'. In there, should be an option 'Environmental Variables'. Click on that which will open another window, In which navigate to system variables box, Where you can find 'path'. It will list the current path variables set which can be modified to point to your SAS installation of E drive.

texasmfp
Lapis Lazuli | Level 10
Anand. Thanks, the Command: path does show that SAS is linked to the C drive. However, when I went to the Environmental variables, there was nothing about SAS. So I added it: first to the system variables and then to the user variables; restarting after each change. Path still shows C:. Any other places I should check? Thanks
Anand_V
Ammonite | Level 13
Can you go back to the environmental variables window and under that select the 'path' variable under System variables and click on Edit..
It should list you all the paths set on your machine.

Check for something like C:\...\SASFoundation\9.4 and Edit those to E drive.

Take a snap of the original path settings, in-case you want to revert it back to the original paths later.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 10 replies
  • 881 views
  • 0 likes
  • 3 in conversation