| Date: | Fri, 6 Jun 2008 09:16:41 -0500 |
| Reply-To: | "data _null_," <datanull@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "data _null_," <datanull@GMAIL.COM> |
| Subject: | Re: Help with SASHELP |
|
| In-Reply-To: | <99920f7a0806060705v2bbf29f3vd042c0a5336260b4@mail.gmail.com> |
| Content-Type: | text/plain; charset=WINDOWS-1252 |
Not exactly what I was asking. You indicate I believe that
SASINITIALFOLDER is set in shortcut that is stored with each
"project". So I believe when you start SAS with the shortcut you get
SASINITIALFOLDER set as expected.
But then you want to run batch SAS via START from a BAT file. This is
where I believe the disconnect occurs. The shortcut where
SASINITIALFOLDER is define is not being used and any info it provides
is not accessible.
I think you will have to specify SASINITIALFOLDER in your BAT of some other way.
Can you use the value of SYSIN to get the same information that would
otherwise come from SASINITFOLDER?
I hope I'm not causing more confusion than help.
On 6/6/08, Ben Dray <ben.dray@gmail.com> wrote:
> Hi, thanks for replying. When I run the batch file SAS does initiate and it
> starts creating the .log file. I haven't defined the path for the sas
> executable but SAS is on a corporate server that we remote desktop into. Is
> that what you were asking?
>
> Ben
>
> On 06/06/2008, data _null_, <datanull@gmail.com> wrote:
> > > At the SAS level for each study I have created a windows shortcut that
> > > assigns:
> > >
> > > -sasinitialfolder(path of study-specific SAS level)
> > > -autoexec(path to autoexec.sas for the study)
> >
> >
> > One question before we go any further. When you write in the BAT...
> >
> > start/w sas
> >
> > Does that use the shortcut you have define? I would think it does not.
> >
> >
> >
> > On 6/6/08, Ben <ben.dray@gmail.com> wrote:
> > > Hi all, excuse the length of my description - the question is at the
> > > end. The reason for the extra detail is in case any of you hear alarm
> > > bells when reading through and can warn me of any impending problems -
> > > which would be much appreciated too!...
> > >
> > > I'm in the process of developing a practical SAS environment at work
> > > and am using the following folder hierarchy:
> > >
> > > ...\client\study\sas\log
> > >
> > >
> > > When run, this autoexec.sas file defines study-specific libraries and
> > > macro variables - eg:
> > >
> > > data test ;
> > > set
> sashelp.voption(where=(optname='SASINITIALFOLDER')) ;
> > > call symput('SLIDPATH',
> trim(left(tranwrd(setting,'\sas','')))) ;
> > > run ;
> > >
> > > %let sponsor=%scan(&SLIDpath,5,\) ;
> > > %let slid= %scan(&SLIDpath,6,\) ;
> > >
> > >
> > > This all works fine when running SAS interactively but I am now trying
> > > to create a batch file to run a group of programs daily using this
> > > format:
> > >
> > > start/w sas
> > > -sysin …client\study\sas\prog1.sas
> > > -config "e:\SAS\SAS 9.1\sasv9.cfg"
> > > -autoexec "…client\study\sas\autoexec.sas"
> > > -icon
> > > -nosplash
> > >
> > > When I run this in batch the macros variables aren't being defined….
> > > So my eventual question to you all is: Is the SASHELP library not
> > > defined when run in batch mode or another way to get these variables
> > > populated in the autoexec.sas?
> > >
> > > Many thanks in advance
> > >
> > > Ben
> > >
> >
>
>
|