Starting Batch Queues with a Script on NT

Chris Kelleher

Administrator
Staff member
Hi Fellow Peggers:

I was wondering if anyone out there is using a batch program to start and
shutdown the background queues in Windows NT. So far I have all apw's,
biw's, wdog and the db's starting and ending with a batch file, however, due
the fact that we take a backup each night (and yes we can afford the
downtime), we have to manually bring the queues back up. This is okay
through the week but now we are starting to have the need to run MRP in off
hours and cannot do so because the has terminated the process. As it would
appear there is not much documentation on this topic.

Any assistance would be greatly appreciated.

Thanks.

Bruce Prevett
Kindred Industries Limited
Kindred USA Inc.
 

Chris Kelleher

Administrator
Staff member
We use the following:

<BLOCKQUOTE><font size="1" face="Arial, Verdana">code:</font><HR><pre>
@echo off
rem startb32 - start 32 bit command
rem pass two parameters
rem %1 = Symix queue name i.e 'huffman1'
rem %2 = Symix database name i.e. 'huffman'
rem
rem Directory where Progress.ini installed.
rem
set dlc=d:\dlc
rem
rem Directory where symix code is located.
rem
set rundir=d:\syteline.srv
rem
rem Directory where symix database parameter file is located.
rem
set dbdir=f:\db
rem
rem Default parameter file. Notice it makes a direct, shared memory
connection
rem to the database. No networking (-H, -N) parameters are used. This is
rem assuming the queue is being run on the database server machine itself.
A
rem shared memory connection to the database is faster.
rem
set pf=%2bg
rem
rem Note: note that the queue name and list file are in the patch
directory because
rem that is where the propath finds the batch folder first, not under
syteline.
rem
echo %1 > d:\patch35b01a\batch\queue
echo %1 > d:\patch35b01a\batch\queue.lst
start "USER BKG - %1" %DLC%\BIN\PROWIN32 -b -basekey INI -p batch\s-rpt
-pf %DBDIR%\%PF%.PF -ininame d:\syteline.srv\symbg.ini >>
d:\patch35b01a\batch\%1bg.log
rem
rem run is complete
[/code]

Chris Mitchell
IT Manager, Huffman Corporation
 

Chris Kelleher

Administrator
Staff member
Since I was the one asking this question a short while ago, perhaps I can
return the favor to those who answered me, and answer you...

The big gotcha on back ground queues is in making sure that when the
databases are shutdown, the queues are shutdown first (and shutdown
properly). If the queue running flag is left set on, the queue wont start
no bueno por nada!

I use the following script in a batch file to start the background queue on
an NT Database Server. I schedule the shutdown in the queue itself so
there's only a requirement for a start queue batch file.

copy e:\syteline.db\queue.lst d:\sl35b02.ptc\batch\queue

d:\dlc.srv\bin\prowin32 -b -p d:\sl35b02.srv\batch\s-rpt.p -basekey
INI -ininame d:\syteline.srv\symix.ini -pf e:\syteline.db\dbrun.pf

Butch Fralia
Central Industrial Supply
 
Top