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

Re: Re[2]: Checking program progress



Tom,

There are a number of points here:
1.  You said you were polling for the existence of the flat file that signals your process has run.  However you have to be careful because just because the file exists doesn't mean the process has finished - it just means the process has *started*.  That's why I suggested creating a *separate* file (eg convert.ok) at the end of the convert process, and check for that.
2.  If you're quick enough you can right-click on the DOS icon that appears in the Windows 95 task bar when the window flashes up.  From the menu choose Properties and then specify that the process should run in a Minimised Window.  It will still appear and disappear but be far less obtrusive than the DOS window.
3.  If you are going the VB route you need to decide whether you are going to initiate the convert process from the VB program, or initiate it from the SQR program and just monitor it from the VB program.  Richard's method will work if you are taking the former approach.  If you are taking the latter approach you need a message hook.  In VB3 there were a few VBX controls around that fired VB events when windows messages occurred.  Spyworks was a commercial package but there was at least one freebie (can't remember it's name though).  I think VB5 has such an ability built in but I haven't looked into it.
4.  On a tangent, I don't know what pre and post processing you are doing regarding the convert, but if you've got VB anyway you might think about writing the whole thing in VB.  The rest then becomes academic.

HTH
>>> Richard Mitchell <richard.mitchell@GSA.GOV> 26/11/98 2:01:00 am >>>

     Not having version 4, and running around this problem ad nausea, I
     opted for VB. It still did not wait until I found a piece of code on
     the web that makes VB wait.

     look in http://tips.kbcafe.com/tips/kb.cgi 

     for a search term type       vb <space> wait   or just wait.

     Paste the function in and wait.

     Rick


______________________________ Reply Separator _________________________________
Subject: Re: Checking program progress
Author:  "tom hippensteel" <thippensteel@spectrumhealth.com> at internet
Date:    11/25/98 9:13 AM


Thanks Wayne, the WAIT parameter can be used with the CALL SYSTEM USING
command as I do, but it only waits until the called program begins running.
I am trying to set up a noop loop that polls the existence of the file that
signals that my program is complete.  I have tried to use this approach, but
the controlling SQR has to call my outside program with CALL SYSTEM USING
and causes the DOS screen invoked by COMMAND.COM (which I have supposedly
suppressed by using the /c argument with COMMAND.COM which supposedly does
not bring up the DOS screen in windows95) to momentarily flash the DOS
screen over and over until the called program is complete.  This is very
distressing to the user, and I need to find a way to call and return from
SQR without causing so much havoc.
I am also looking into writing a visual basic program that checks for the
windows message that gets set when the called program completes.  The
problem with this approach is that I do not know how to check this signal
short of using the same looping polling method I am now using...
Anyone have any other ideas?
> -----Original Message-----
> From: Wayne Ivory [SMTP:wivory@WSL.COM.AU] 
> Sent: Tuesday, November 24, 1998 7:55 PM
> To:   Multiple recipients of list SQR-USERS
> Subject:      Re: Checking program progress
>
> Hi Tom,
>
> I've seen in other posts a WAIT parameter used with the CALL SYSTEM USING
> command, but it's not in my documentation (SQR 3) so I'm assuming it's
> from a later version.
>
> If the external conversion program is something you've written then you
> could possibly add a routine to create a status file on completion.  In
> your SQR you have a second CALL that loops while waiting for that file to
> become existant.  That second CALL would probably have to use the return
> status to indicate whether it found the file or not, eg for DOS "IF EXIST
> C:\CONVERT.OK EXIT 5" (Note:  I don't actually know whether DOS would
> return a 5 in this case or not - I'm just demonstrating the idea).
>
> Good Luck!
>
> Wayne Ivory
> Information Services
> Westralian Sands Limited
>
>
> >>> Tom Hippensteel <THippensteel@SPECTRUMHEALTH.COM> 25/11/98 4:00:11 am
> >>>
> I am using SQR to start a conversion program (separate from SQR) using
> CALL
> SYSTEM USING.  CALL SYSTEM USING works great, but I need to know when the
> external conversion program is finished.  I probably need to look at some
> window event by running a Visual Basic(VB) program etc., but how do I
> communicate between my SQR and the external program or VB?  Any Ideas?
> Thanks ahead of time!!!
> I am using SQR with Oracle database for PeopleSoft Financials 7.5.
>
> Tom Hippensteel
> Applications Specialist
> thippensteel@spectrumhealth.com 
> 314-919-9807

Wayne Ivory
Information Services
Westralian Sands Limited