[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Calling an SQR from an SQR



My apologies, this is a Peoplesoft related SQR question.

I have the need to call and SQR from within another SQR. I am using the
following code at the end of the first SQR to call the second. What I
need is a way to get the operator ID and password they used and pass it
to the $Connect_String variable. I tried using the example in the SQR
for peoplesoft book using the GETENV function but, I can't seem to get
it to work. When I run the program I get the parameters window just as
if I started just SQRW. I can hard code the $Connect_String variable
with a valid username and password and everything works correctly. i.e..
username/password@database

We are using PS 7.5 and Oracle 7.0 This process will only be ran on the
client. Any help would be greatly appreciated.

   Let $Connect_String = getenv('MYENV')  ! SQR for Peoplesoft Example
   Do CallOtherPrograms('dzlabels.sqr')
   Do CallOtherPrograms('ins8062.sqr')
end-procedure

begin-procedure CallOtherPrograms($ProgramName)

   Let $Command = 'm:\psbpi\psoft\cfs752\sqrbinw\sqrw.exe ' || -
                 'm:\psbpi\psoft\cfs752\sqr\' || $ProgramName || -
                  $Connect_String || -
                  '-im:\psbpi\psoft\cfs752\sqr\ ' || -
                  '-mm:\psbpi\psoft\cfs752\sqr\allmaxes.max -fc:\temp\ '
|| -
                  '-oc:\temp\sqr.log
-ZIFm:\psbpi\psoft\cfs752\sqr\pssqr.ini'

   CALL SYSTEM USING $Command #Command_Status WAIT

end-procedure

Again my apologies for the peoplesoft related question.

Thank You,
John Ferguson