Hello David!
Replying to a message of David Noon to Francois Massonneau:
DN> I saw your earlier message last month and replied.
I didn't see it ;-( Sorry. I'm just connected again to those OS/2 echoes thru
a new feed in Germany.
DN>>> This means it will terminate after one poll. Also, the conditional
DN>>> leave statement (mentioned above for its IF part) will need to be
DN>>> changed to:
DN>>> if files.0 = 0 then
DN>>> exit 0 /* was leave */
FM>> I did that, but it doesn't work as expected.
FM>> If I put "exit 0", when no more files are in the subdirectory, the
FM>> window is closed, but the windows that launched the script and the
FM>> one where the dialer is running are still opened and wait for the
FM>> signal the script must send to tell everything is done. so I left
FM>> the "leave" statement.
DN> This should cause the REXX program to terminate in error. The LEAVE
DN> statement applies to the context of a DO group, and removing the DO
DN> FOREVER removes that context.
Yes, but the DO FOREVER I removed was the one at the beginning of the rexx
file, the "leave" statement I have, applies to another DO FOREVER, just three
lines above the leave statement,
DN>>> So you are no longer using a semphore file.
FM>> It's no longer a semafore file, but the script sends a signal to
FM>> HWAIT.
DN> What kind of signal? Does it post an event semaphore (not a file)
DN> instead?
HSTART sends a signal to another program named HWAIT which is waiting for this
signal. This allows you to launch a program or a CMD file from a DOS batch
file (and vice versa), then make that Dos batch to wait for the end of the CMD
file when the later sends a signal to hwait which is waiting.
FM>>> 3) At the end of the script, I saw you write two times (one before
FM>>> and one after the subroutine "StopDialler"), the following lines :
FM>>> /* Reset elapsed time counter */ CALL TIME 'R' RETURN I suppose
FM>>> one is for the subroutine StartDialler, and the second one is for
FM>>> the subroutine StopDialler. Is it a code to give the time on line ?
DN>>> It is part of that code.
DN>>> There should be a TIME('E') call somewhere in the StopDialler
DN>>> subroutine that should display the elapsed time.
FM>> Where ?
FM>> ADDRESS 'CMD' KillDialer
FM>> CALL LogMsg 'dialer, if running, is killed.'
FM>> CALL LogMsg 'Dialer disconnected after ' || TIME('E') || '
FM>> seconds.'
DN> ... right here! (Above)
It doesn't work ;-(
I tried :
ADDRESS 'CMD' KillDialer
CALL LogMsg 'dialer, if running, is killed.'
CALL LogMsg 'Dialer disconnected after ' || TIME('E') || ' seconds.'
CALL TIME('E')
and :
ADDRESS 'CMD' KillDialer
CALL LogMsg 'dialer, if running, is killed.'
CALL TIME('E')
CALL LogMsg 'Dialer disconnected after ' || TIME('E') || ' seconds.'
but it didn't work. I still have :
22 Nov 1999 09:32:54 Dialer disconnected after 0 seconds.
FM>> I saw a problem with the log generated.
FM>> A file is created in my root directory, named DIALUPLOGFILE. In it I
FM>> have all the sentences that should be put in the dialup.log file,
FM>> but the sentences are the ones generated by the PingServer
FM>> Procedure. It seems that a "CALL LogMsg ..." statement contained in
FM>> the PingServer procedure is not written in the dialup.log file, but
FM>> in a dialuplogfile file in my root directory. Is it because I have
FM>> the beginning of the procedure written that way : PingServer:
FM>> procedure call LogMsg 'PingServer starting' .../. instead of :
FM>> PingServer: PROCEDURE EXPOSE DialupLogFile call LogMsg
FM>> 'PingServer starting' .../.
DN> It could be. I no longer have your code. If the variable DialpuLogFile
Yeap, it was the culprit :-) now this problem is solved.
Do you have an email address where I can send this rexx script, as I modified
it to follow your instructions ?
Bye, Francois!
Email: fmas@celtes.com
Web : http://www.worldnet.net/~island/
---
* Origin: Island's BBS, a Node in the Atlantic Ocean (2:326/2)
|