Architecting, installing and maintaining your SAS environment

SASGSUB: changing SAS WORK data library location

Reply
New Contributor IU
New Contributor
Posts: 4

SASGSUB: changing SAS WORK data library location

I am using SASGSUB in MS Windows batch files to submit SAS code to the SAS Grid.

The batch script code for SAS 9.2 is shown below. The customized config file, sasgsub92.cfg, is located in  C:\Users\%username%\SASGrid.

The default SAS WORK data library location assigned to a SAS session created by this submit is WORK= C:\Users\%username%\<_TD…..>

What option should be used to change the default SAS WORK data library location (C:\Users\%username%)  to another path?  

SET RunSAS="C:\Program Files\SAS\SASFoundation\9.2\sasgsub.exe" -gridconfig "C:\Users\%username%\SASGrid\sasgsub92.cfg" -metauser %username%
%RunSAS% -gridsubmitpgm "%mypath%%pgm%" -gridsasopts " -log '%mylog%.log' -print '%mylst%.lst'"

 

 Thanks,

IU

New Contributor
Posts: 2

Re: SASGSUB: changing SAS WORK data library location

You can use a libname statement like
libname work "<pathname>";

But don't forget: then the work library is permanent!

Regstes, Olaf
https://www.youracclaim.com/user/olaf-wagner
Super User
Posts: 5,424

Re: SASGSUB: changing SAS WORK data library location

-work
Data never sleeps
New Contributor IU
New Contributor
Posts: 4

Re: SASGSUB: changing SAS WORK data library location

Yes, LinusH:

 "-work" is the option I am trying to use.

But it does not work in the sasgsub config file (sasgsub92.cfg in my example):  

-GRIDSASOPTS  "-work \\servername\...."

It works in the sasgsub.exe command line:

-gridsasopts " -work \\servername\...<other SAS options>."  

Is there any way to tell the sasgsub.exe  command to use the "-work" option from the sasgsub config file?

 

Thanks,

-IU

Super User
Posts: 10,020

Re: SASGSUB: changing SAS WORK data library location

Add option at the top of your code.

 

options user='c:\temp\';
Ask a Question
Discussion stats
  • 4 replies
  • 479 views
  • 0 likes
  • 4 in conversation