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!

How to run a Progress procedure from windows

Status
Not open for further replies.

caillebotte

IS-IT--Management
Dec 8, 2002
22
US
Hi.
I know how to run a progress procedure in batch mode from an AIX command line something like the following:

mpro /db/path/dbname -p /home/joeblow/src/procedure.p -b

Can anyone help me figure out how to do the similar thing from Windows command line or a .bat file?

We have a Windows Progress 9.1D database. The network path is: \\winmxp\mxp\mxpprod

Any help will be greatly appreciated.
Thanks.
Caillebotte
 
Look in the bin directory of where Progress is installed (ie c:\Program Files\Progress). You'll find all your familiar commands there, including mpro and mbpro. You can create a batch file to run a progress program in the background the same as you do on AIX, using the -b parameter or mbpro.

Have you tried that and are you having problems?

One thing to make sure of is that the DLC and PROMSGS environment variables are set. I don't trust Windows to have them set, so I always set them in my batch files. The downside is if someone changes those in Windows, my batch files still need to be changed - but honestly, that rarely happens.

Let me know if you need more help. :)

Rich

 
Thanks for responding Rich.

I've actually been able to get this thing running now for the most part, but I think I'm maybe doing it the hard way.

Here is my latest statement:

"C:\Program Files\PROGRESS\bin\prowin32.exe" -pf c:\mxp\mxpprod\env\john.pc -p c:\mxp\getnightly.p

I haven't tried to use mpro or mbpro like you mentioned yet but I will. Could you possibly supply an example of a statement that I could learn from using my paths, etc?

Also, at the end of my procedure a box pops up asking for a login and password to my database. Is there anyway to suppress that?

Also, can you supply an example of how to set DLC and PROMSGS environment variables in the batch file as you mentioned? I've got mine set in the john.pc file referenced above.

Here is the contents of the john.pc file:

-db mxpprod
-H ads-mxp
-S prodmxp
-N TCP

Thanks very much once again for helping!
Caillebotte.
 
I set the DLC and PROMSGS in the batch file (which is similar to unix script file):

set DLC=c:\progra~1\progress
set PROMSGS=%DLC%\promsgs

I have had troubles using the full "Program Files" name in scripts so I use the old dos 8 character version. You will sometimes get an error message about not being able to find the promsgs file, sometimes you won't. It's just easier to set it up just in case. Now you can use these variables:

%DLC%\bin\prowin32.exe -pf c:\mxp\mxpprod\env\john.pc -p c:\mxp\getnightly.p -b

So you'd have a file named something like getnightly.bat and it would have:

set DLC=c:\progra~1\progress
set PROMSGS=%DLC%\promsgs

%DLC%\bin\prowin32.exe -pf c:\mxp\mxpprod\env\john.pc -p c:\mxp\getnightly.p -b


As for userid and login, use the -U and -P options in your .pc:

-db mxpprod
-H ads-mxp
-S prodmxp
-N TCP
-U FredF
-P Wilma

Of course the down side to this is anyone can look at your .pc and see the user and password, so you have to be careful there. mpro and mbpro are just batch files pointing to prowin32.exe, so you don't have to use them.

Just curious, why did you name the pf file .pc instead of .pf? Progress doesn't really care what you name it, but it might confuse someone else when they are trying to see what's going on - .pf is the standard.

Hope that helps!

Rich

 
Rich.

Thanks a lot for your detailed posting. It clears up a lot.

I used .pc out of ignorance. I've already made the change to .pf per your suggestion.

I added the -U and -P variable definitions to the file and that solved the login box problem.

I will test your batch file environment variable suggestions also.

Thanks again for your great help!

Caillebotte
 
Anytime! Let me/us know if you have any other questions! :)


Rich
 
Rich.

I do have one more question.

My procedure ran last night and now there is no login/password box popped up. However, the batch file window and a Progress procedure editor window both are left open. Any way to get these to close?

Thanks.

Caillebotte
 
The last line of the Main Block in getnightly.p should be:
Code:
QUIT.
Can't remember how to get the batch file window to close.

BTW, mbpro sets up the DLC environment variable for you, but not PROMSGS.


Mike.
 
Perfect.
The QUIT. statement did the job.
That closed the batch window as well.

Thanks a LOT Mike.

Caillebotte
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top