Terry,
We use separate machines for our development and production servers, which can help to eliminate the problem. However, we did have a similar problem with our interface flat files. The solution we came up with was to include an "msid.sqc" file with a single line in it:
#define MSID PROD
and use the {MSID} syntax as part of our file names. Of course, we had to have separate "msid.sqc" files for each environment. This technique allows us to use separate directories for development, test and production on only two machines...however, we did not go to this level for the .lis and .spf files.
Rick
Metropolitan Water District of So. Cal.
-----Original Message-----
From: Tony DeLia [mailto:tdelia@EROLS.COM]
Sent: Monday, July 26, 1999 11:16 AM
To: Multiple recipients of list SQR-USERS
Subject: Re: SETENV.SQC & Directing SQR input/Output on UNIX
Terry,
Here's a "potential" solution (in theory)... Great care needs to be
taken since setenv.sqc effects every delivered SQR... I quickly tested
this on a client-workstation running SQLBase... there were no
problems... but I only tested one program! I'll explain the "pitfall" at
the end of this procedure...
There may be several other methods to accomplish your task (or come
close)...
A) Create an argument file for each database you're using... such as...
Filename Contents
============ ==================
psprd.ask PSPRD
psdev.ask PSDEV
Each contains 1 record (the database name)...
Place these argument files in the proper "Working Directory" for each
environment (Unix, Client)...
B) For each database under Process Scheduler=>Use=>Process Types modify
all
applicable process Types to include the argument file
(under SQR Parms -> SQR Run Cntl Parms)...
SQR Report:
@psprd.ask %%INSTANCE%% %%OPRID%% %%RUNCNTLID%%
SQR Process:
@psprd.ask %%INSTANCE%%
NOTE: The PSPRD database has the psprd.ask argument file included...
The PSDEV database has the psdev.ask argument file included...
C) Modify SETENV.SQC as follows...
#ifdef UNIX
ask subvar 'Enter Database'
#ifdef subvar = 'PSPRD'
#define FILEPREFIX /opt/psprd/
#else
#define FILEPREFIX /opt/psdev/
#endif
#endif
In summary the changes (so far) are as follows...
A) Create argument file for each database...
B) Update all Process Types to utilize argument file (before
pi/id/rc)...
C) Modify SETENV.SQC to ASK for dbname (subvar) to control FILEPREFIX...
Now the unfortunate part of this modification...
D) Each SQR must have setenv.sqc included within the
begin-setup/end-setup areas!
Most PeopleSoft programs have this before them! Also ome of the setup
SQC files
have the begin/end-setups within them... you would need to switch to
the ones
that don't have it... (setup02 and setup02a for example)...
So this idea may not be what you're looking for afterall... but it was a
good opportunity to demonstrate the relationship between SQR,
ask/argument files, setenv.sqc and Process Scheduler...
Good Luck, Tony DeLia
Terry Micciche wrote:
>
> I have a question about the SETENV.SQC and SQR input/output file
> directories....
>
> We are running 7.5 of HR/SA on a Sun UNIX/Oracle platform. Our question
> is
> regarding when SQRs running on UNIX read input files or write output
> files.
> Our UNIX directory structure is such that the database name determines
> one
> of
> the levels in the name. For example, our PS_HOME directory for our
> Development
> DB is:
>
> /opt/psdev/....
>
> whereas our PS_HOME directory for our Production DB is
>
> /opt/psprd/.....
>
> PS delivers the SETENV.SQC that sets up the environment variables. This
> SQC
> defines the FILEPREFIX substitution variable for UNIX:
>
> #ifdef UNIX
> #define FILEPREFIX /usr/tmp/
>
> This FILEPREFIX substitution variable is used throughout the delivered
> system
> to direct reading of input files and writing of output files.
>
> We obviously need to change this UNIX directory to be unique to our UNIX
>
> environment. We want to one version of SETENV.SQC that works for all
> environments without having to modify delivered SQRs. Any words of
> wisdom
> for us?
>
> Leslie Mathews
> Northern Arizona University
> Applications Systems Analyst, Sr.
> 520-523-6469
> leslie.mathews@nau.edu
--
Tony DeLia
AnswerThink Consulting Group
PeopleSoft Solutions Practice - Delphi Partners
tdelia@erols.com
http://www.sqrtools.com