Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pause Option

Status
Not open for further replies.

carolynh

Programmer
Feb 13, 2004
44
US
I am running a 'listener' program that simply watches for records to be written to a table;

WATCH-XML-TRXS:
repeat:
does some procressing
pause 60.
end.

My problem is that Progress does not recognize the pause statement unless I put some kind of transaction after it; like a message box. However, I do not want a message box to constantly display on the screen of the server where I am running this process. I have also ran into issues with having to hit the space bar. I think I can eliminate that issue with the No-Message option. Has anyone else ran into this kind of issue, and if so what kind of options are there to get around this?
Thanks
Carolyn
 
This is new to me. I've used this type of logic in numerous procedures for years, and have never had a problem. Have you checked the 'do some processing' logic to see if there is something there that could inhibit normal functions? Beyond that, an alternative solution would be an internal loop count:

def var i as int.
def var x as int.
repeat:
'do some processing'
x = 0.
do i = 1 to 10000:
x = x + 1.
end.
end.

This will create a software delay (which is the same thing the 'pause' does) for varying amounts of time. You just have to determine how the counter value (i) equates to time. It's not as efficient as the pause, but it does have it's merits. Just another means to an 'end'.

 
I have also tried the No-Message option, but it does not work. It is acting like it has to have some type of transaction after it.

Also I am trying to run a this xml_listener.p program in a batch file but I am having trouble with that too. Could you give me an example of what my command line would be? I want to run it with the -b param so it just runs in the background.
Thanks
 
what I actually want to do is to try and run the xml_listener.p program as a batch file in the background on the server so no one even notices that it is running. However when I try and run it; it ignores the pause message and writes a record to the xl-trans table about every second instead of pausing every 2 minutes (Pause 120 No-Message). Any thoughts or ways I can do this would be greatly helpful
Thanks
Carolyn
 
Just a thought, but do you have a WAIT-FOR in your program ? If so, you need to get rid of it as it's meaningless in a batch context, and let the PAUSE do the job instead. And an internal loop count isn't really a solution -- it will just burn up CPU cycles.

Mike
 
HelloMike
No I do not have a wait-for in my procedure and your absoultely right about the internal loop count.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top