Date: Wed, 21 Feb 2001 19:36:36 GMT
Reply-To: SM <sqmishra@ACM.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: SM <sqmishra@ACM.ORG>
Organization: Ireland On-Line Customer
Subject: Re: SAS Services fro NT
Thanks Greg & Lex, both the suggestions did what I was hoping for in batch
mode.
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.
Samir.
----- Original Message -----
From: "Lex Jansen" <f.jansen@organon.oss.akzonobel.nl>
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"
and
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"
button
> 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
the
> 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
called
>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
the
>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: greg.woolridge@tap.com
>phone: 847-582-2332
>fax: 847-582-2403
>
===ORIGINAL===
>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
service.
>The documentation explains how to set up the service, but fails to
explain
>the advantages of doing so, or any practical applications. Does anyone
have
>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
>ideas
>on how to going about running batch scripts, I thought I'd ask the
experts.
>
>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
be
>VERY much appreciated.
>
>Thanks in advance.
>Samir.