Date: Wed, 21 Feb 2001 21:32:48 +0100
Reply-To: Lex Jansen <l.jansen@LEX-JANSEN.DEMON.NL>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Lex Jansen <l.jansen@LEX-JANSEN.DEMON.NL>
Subject: Re: SAS Services fro NT
I don't know if this helps, but here is how I use it with many people
working on a file server with many different projects and studies. (SAS
On every PC in the CONFIG.SAS I define a central AUTOEXEC.SAS:
(U: is the fixed drive mapping to our central server)
All programming happens in a standard structure on the server:
Since ALL programs either run in the _USER<n> folder or the PROGRAM folder,
I define libnames in the central AUTOEXEC.SAS like:
libname input "..\input";
In this way I do not need to specify study specific libnames!
And the users do not need to specify libnames either.
Crucial is that SAS starts in the folder where the program resides, which is
always the case in BATCH mode.
In inter-active mode people have to rightclick on their folder and choose
"SAS here" (as I explained in an earlier message)
Hope this helps,
"SM" <firstname.lastname@example.org> wrote in message
> Thanks Greg & Lex, both the suggestions did what I was hoping for in batch
> I'm trying to create SAS CONFIG scripts which will read WIN NT Environment
> Variables. Is this possible?
> What I'd like to do is create a batch file as below -
> --- WIN NT BATCH BEGIN ---
> set PROJECT_NAME=newproject
> sas.exe -config MY_CONFIG_FILE.CFG
> --- WIN NT BATCH END -----
> Now the configuration file will have a reference to the project name for
> the work files and user files. This allows me to keep work/user files
> separate for each user and project. Makes running concurrent SAS sessions
> easier too.
> For Example, now in my SAS CONFIG file MY_CONFIG_FILE.CFG will have
> something similar to -
> -SET SASUSER "DRV:\DIR\%PROJECT_NAME%\SASUser\%USERNAME%"
> -SET SASWORK "DRV:\DIR\%PROJECT_NAME%\SASWork\%USERNAME%"
> -WORK "DRV:\DIR\%PROJECT_NAME%\SASWork\%USERNAME%"
> -AUTOEXEC "DRV:\DIR\%PROJECT_NAME%\SASUser\autoexec.sas"
> In AUTOEXEC.SAS I'd use %SYSGET to extract other environment variable
> values based on the project name and directory. I've tried using
> -WORK "DRV:\DIR\!PROJECT_NAME\SASWork\!USERNAME"
> because the default CONFIG file was using !SASROOT in a number of places.
> But it didn't work.
> I hope I made sense above and someone may have some idea.
> Thanks in advance.
> ----- Original Message -----
> From: "Lex Jansen" <email@example.com>
> Newsgroups: comp.soft-sys.sas
> Sent: Wednesday, February 21, 2001 4:19 PM
> Subject: Re: SAS Services fro NT
> You could do the same for the File Type "File folder" (instead of "SAS
> System Program"),
> add an action called "SAS here",
> with "Application used to perform action" :
> c:\sas\sas.exe -nosplash -config drive:\directory path\config file name
> Then you can right-click on a folder in the Explorer, choose "SAS here"
> SAS will open in the selected folder and using the right config file.
> Lex Jansen
> NV Organon
> >3. At our site, we have a common configuration file stored on a network
> >drive that all SAS users have access to. To get SAS to use this file you
> >must tell your PC to point to it as follows:
> > Open Explorer window
> > Navigate to a directory containing a SAS program (with extension .sas)
> > and click on it
> > From the window menu bar select "View" and then "Options"
> > Select "File Types" in the Options window
> > Scroll down the list of types until you find "SAS System Program" and
> > select it
> > Select "Edit" button in the "Edit File Type" window that pops up
> > Select "Batch Submit" under "Actions" and then select the "Edit"
> > An "Editing action for type:..." window pops up
> > Modify entry in "Application used to perform action" to point to the
> > standard config file. This is usually done by adding, at the end of
> > command,
> > -config drive:\directory path\config file name
> > Select "OK" to return to Edit File Type Window
> > Select "OK" to return to Options window
> > Select "OK" to return to Explorer window and you are done.
> >This works for the batch submit, but we have found that it does not work
> >for the Open command. Our solution has been to create a new action
> >Open Network Config, and set up everything like the normal Open command
> >except to have the application point to the standard config file as in
> >Batch Submit. We also mark this command as the default so that it is the
> >command executed when a user double clicks on a .sas file.
> >These modifications must be made on each machine where SAS is used.
> >Hope this helps you out.
> >Greg M. Woolridge
> >Manager, Study Programming
> >TAP Pharmaceutical Products Inc.
> >e-mail: firstname.lastname@example.org
> >phone: 847-582-2332
> >fax: 847-582-2403
> >I just installed SAS on Win NT (more used to UNIX) and 3 questions sprang
> >directly to mind.
> >1) One of the options mentioned is the ability to run SAS V8 as a
> >The documentation explains how to set up the service, but fails to
> >the advantages of doing so, or any practical applications. Does anyone
> >any experience in running SAS as a service, and perhaps an example or 2
> >where this is beneficial to the user?
> >2) How do I run SAS in batch mode? I don't care much for the GUI (using
> >Textpad as my editor, LOG & list viewer) and though I have a couple of
> >on how to going about running batch scripts, I thought I'd ask the
> >3) How do I customize SAS for multiple users on the same machine (SAS is
> >installed locally) with a generic startup script? Any good examples will
> >VERY much appreciated.
> >Thanks in advance.