[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re[2]: syntax for CALLING another SQR program
- Subject: Re[2]: syntax for CALLING another SQR program
- From: Richard Mitchell <richard.mitchell@GSA.GOV>
- Date: Tue, 1 Sep 1998 07:15:00 -0400
I have created a program that handles the call and login. What I did
was:
1. Load the SQR I want to call in a text file.
2. Read in the data.
3. Use the report name to initiate a 'CALL SYSTEM USING' to call a
batch file of the same name. Parms to the batch are passed, and the
batch has to login information. Not secure, but it works.
let $_program = 'C:\WINDOWS\REPGEN.BAT '||$_location||'
'||$_USER-PARM2||' '||$_ENDING-DATE||' '||$_open-closed-both||'
'||$_REPORT-NAME||' '||$_SPF-NAME||' '!||$_USER-PARM1
CALL SYSTEM USING $_PROGRAM #RETURN-CODE
HTH
Rick
______________________________ Reply Separator _________________________________
Subject: Re: syntax for CALLING another SQR program
Author: "c. duncan hudson" <c_duncan_hudson@yahoo.com> at internet
Date: 9/1/98 6:56 AM
> Could anyone please show me as how it is done to
> call the execution of another SQR program within
> one? What would be in the text string for
> $command in order to execute the following code:
> 'call system using $command #return-status'
Jennifer, the following code will call an SQR program from within
another SQR program. Unfortunately, it is not all that flexible. I
have a need (and was about to post a question when I saw your post) to
do exactly what your asking (call one SQR from within another), but I
don't want to have to hard code the database logon information into my
code. I was hoping that there was a way to have the main program pass
the logon information to the sub program or maybe even run the sub
program without re-invoking SQRW (or SQRWT). Does anyone have any
thoughts / ideas?
Dunc.
Main Program:
begin-program
display 'In Main Program'
let $command = 'sqrw -c -cb nested.sqr id/pwd@sid'
call system using $program #return
display 'Back in Main Program'
end-program
Called Program:
begin-program
display 'In Called Program'
end-program
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com