Question Editor Left 'open' When Program Is Run

vdennis

Member
I am trying to use a batch file to run a progress program. The program starts and runs just time, but when it is completed the 'editor' window pops up, forcing me close to close it before the batch process continues. I had done this once before, but my boss has told me that the file I used before is no longer available as they ditched that server. This batch file has to run on a window box.
This is what is in the batch file:

C:\Progress\OE111\bin\prowin32.exe -db nxt.db -H serenity -S 7100 -U xxxxxxxx -P xxxx -p C:\NxT\staging\sitegui\supam\saonlineack_v2.r

(All on one line):
What is funny is that the .r runs to completion, it is only after that point that the editor pops up.

This is also an InFOR system, and I'm wondering if that has something to do with it
As I need to run this every 15 minutes or so, I am trying to do this without just having the program run in a loop.
Thanks for looking at this post, looking forward for any possible answers.
-Dennis-
 

RealHeavyDude

Well-Known Member
What you see is known behavior.

Most likely that is because you have a developer license installed. You can avoid it either by coding a quit as the last executable statement in your session or you use the -rr startup parameter to the session. But, for the latter one to work, you also need to have a runtime license installed.

Heavy Regards, RealHeavyDude.
 

TomBascom

Curmudgeon
If it is a batch job you shouldn't be using prowin32.exe -- batch jobs should be headless and gain nothing from being bound to the GUI and made speciously platform dependent. _progres.exe is probably more appropriate.

Adding -b to the command line will run it in the background and it will quit at the end. If there is output it will need to be redirected.

Typically you would use that sort of command as a "scheduled task" on windows or a "cron job" on UNIX.
 
I am trying to use a batch file to run a progress program. The program starts and runs just time, but when it is completed the 'editor' window pops up, forcing me close to close it before the batch process continues. I had done this once before, but my boss has told me that the file I used before is no longer available as they ditched that server. This batch file has to run on a window box.
This is what is in the batch file:

C:\Progress\OE111\bin\prowin32.exe -db nxt.db -H serenity -S 7100 -U xxxxxxxx -P xxxx -p C:\NxT\staging\sitegui\supam\saonlineack_v2.r

(All on one line):
What is funny is that the .r runs to completion, it is only after that point that the editor pops up.

This is also an InFOR system, and I'm wondering if that has something to do with it
As I need to run this every 15 minutes or so, I am trying to do this without just having the program run in a loop.
Thanks for looking at this post, looking forward for any possible answers.
-Dennis-
add QUIT command
 

vdennis

Member
I think you hit it on the head. Yep, running the test software on a machine with a developers license. Going to try the quit first, then the -rr. We stopped using the batch file about 4 years ago when we lost a large account. I had forgotten that it was running on a server that got 'retired' and they didn't save anything from it. I hope to be able to run it on the developer server as that is a 'hard' server that seldom shuts down. The rest are virtual servers, (unity1, unity2,....) that share common files on UNITY. So we'll see.
The program creates PDF files from Crystal Reports that will emailed using another program. I do have the Crystal Reports Runtime RDC's. Had CR help me create an install program in 2004-5 when I was still working for Bay Country Lawns. If anyone needs it, it's free, and at one time I sent it up here. Don't know what happened to it.

So thanks, and I'll let you know which worked the best.
-Dennis-
 

vdennis

Member
I am assuming that the startup commands for _progress.exe are the same as for using prowin32?
The program has to run in a windows environment as I am using Crystal Reports to create a highly graphical document. Before we had used the windows task scheduler to run the program, which would only take about 30 seconds to run. So running in the background was not an issue. Also, if no data was found for processing it would quit at that point. Lot of good suggestions here, and this may be a way for me to incorporate scheduled task with SX, as they don't have a windows version. I've written a number of reports that create excel sheets, and would be nice if I could set them up to run on a schedule within SX (UNIX)
-Dennis-
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
The client connection parameters (-H, -S, -p, etc.) are the same for the gui and tty clients. You should be able to use the same command line, swapping prowin32.exe for _progres.exe (with one "s"). This assumes that your application code doesn't have any dependencies on Progress GUI code in the propath or GUI-only AVM functionality.
 

Cringer

ProgressTalk.com Moderator
Staff member
If you're using _progres in windows, along with an ini file, be aware that it uses the [WinChar Startup] section for propath etc rather than the one at the top of the file.
 

vdennis

Member
And the winner is..... -rr
I could not use the _progress.exe, as that brought up the 'dos' version of progress, and I needed to make calls to window based programs like Excel, Word, and Crystal Reports. Also using the -rr option allows for numerous exit points without having to worry of having the quit statement at each point. Thanks for all the suggestions. Again, I have learned something.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
And the winner is..... -rr
I could not use the _progress.exe, as that brought up the 'dos' version of progress, and I needed to make calls to window based programs like Excel, Word, and Crystal Reports. Also using the -rr option allows for numerous exit points without having to worry of having the quit statement at each point. Thanks for all the suggestions. Again, I have learned something.
While there is some functionality that is only available in the GUI client, that doesn't include COM automation. This runs fine in _progres.exe:
Code:
define variable v-x  as com-handle.
define variable v-wb as com-handle.
define variable v-ws as com-handle.

create "excel.application" v-x.

v-wb = v-x:workbooks:add().
v-ws = v-x:sheets:item(1).

v-ws:range("A1"):value = 'hello world'.

v-x:visible = true.

release object v-ws.
release object v-wb.
release object v-x.

Did you try using the CHUI client?
 

vdennis

Member
The command we are using is :
C:\Progress\OE111\bin\prowin32.exe -db nxt.db -H xxxxxxxx -S 12345 -U sysprogress -P xxxxx -rr -p C:\NxT\staging\sitegui\supam\saonlineack_v2.r
exit
This is run from a batch file which is called from windows task manager. Runs every 15 minutes.
 
Top