Running .p/.r from NT batch file

jmhrivnak

New Member
Hi All,

I am trying to use AT in NT to schedule some .p/.r utilities to run everynight in the evenings. I am very much a beginner at this and was hoping someone could forward a sample .bat file that would run .p/.r files. Any help or reference to appropriate resources would be greatly appreciated.

Oh yeah.. I am running Syteline 5.0 on Progress v9.1 on NT 4.0

Thank you!

-John :confused:
 

jamesmc

Member
Hi there,

The command line you would want to use to run something from a prompt would be:

$DLC\prowin32 -db {db name&path} -ld {logical name} {other command line options} -b -p {progname.p/.r} >> {.log file}

That should do you. You may need to put more on the redirect to log file parameter as this will only send output from Progress or the program, you may also need to capture OS errors. I can't remember the syntax but you will find it somewhere in a forum here or someone else might post it?

HTH,

James.
 

jmhrivnak

New Member
Thanks James,

Two quick questions... what is -ld {logical name} and if the utility already specifies an output do I need to include the >>{.log file}?


Thanks again.

-John :dizzy:
 

jamesmc

Member
Hi there John,

the -ld parameter specifies a logical name for the database. This name is used in your programs to refer to databases, for example, the mfgpro database is called mfg.db but you refer to it as qaddb in the progress code because the -ld parameter is set to '-ld qaddb'.

You do also need the >> because even though your code is outputting information to a specified file, any errors that occur during the execution need to be redirected to a file so that if the program fails you can anaylse the errors. To put it another way, because the program is running in batch mode it won't send errors or messages to the screen, the file specified after the >> is where these messages are stored.

HTH,

James.
 

jmhrivnak

New Member
Ok.... so far so good. It seems to be calling the .p BUT I get an error in the log file and the .p doesn't fully execute:

** Insufficient acces privelage for table coitem. (234)

Any suggestions?

Thanks again.

-John :errr:
 

Chris Kelleher

Administrator
Staff member
It looks like you have security setup on the database.... so in the command line you are using to start Progress, add -U username -P password to connect as a certain user (with the rights needed to run your program).
 
Top