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

Re: Running Successive SQR



Thanks very much for your help, Nathan.
 -Bill

----------
From:   Nathan Treadway[SMTP:nathant@ONTKO.COM]
Sent:   Tuesday, June 18, 1996 8:17 PM
To:     Multiple recipients of list SQR-USERS
Subject:        Re: Running Successive SQR

> I am trying to run a series of SQR's against Microsoft SQL Server (v
> 4.21) on Windows NT (v 3.51) and am having difficulty in determining
> when one SQR ends so that I can begin the next (apparantly you cannot
> run two at once in this environment).  Ideally, I would like to be able
> to write one "master" SQR to accomplish this as   a type of driver.

If what you want to do is have several different, stand-alone sqr programs
that can also be run one after another by a "driver" program, the following
approach might be helpful.


--------------------prog1.sqr-------------------------------
#ifndef MAIN
begin-program
do prog1
end-program
#endif

begin-procedure prog1
!do whatever you want
end-procedure !prog1
--------------------prog2.sqr-------------------------------
#ifndef MAIN
begin-program
do prog2
end-program
#endif

begin-procedure prog2
!do whatever you want
end-procedure !prog1

--------------------driver.sqr-------------------------------
#define MAIN blah
#include 'prog1.sqr'
#include 'prog2.sqr'

begin-program
do prog1
do prog2
end-program

------------------------------------------------------------

Prog1 and Prog2 can each be run separately, or can be run
one after the other using Driver.

You do need to be careful that none of your programs assume that
variables are created empty (or equal to 0) if you use those same
variables in more than one of your programs....


                                                Nathan

----------------------------------------------------------------------------
Nathan Treadway    | Ray Ontko & Co. | info@ontko.com (auto-reply server)
nathant@ontko.com  | Richmond, IN    | ftp.ontko.com, http://www.ontko.com/


Unrecognized Data: application/ms-tnef