Consultor Eletrônico



Kbase P174598: How to write script statements to check if a proquiet has been enabled?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   08/10/2010
Status: Unverified

GOAL:

How to write script statements to check if a proquiet has been enabled?

GOAL:

How to script proquiet?

GOAL:

How to script proquiet enable?

FACT(s) (Environment):

OpenEdge 10.x
All Supported Operating Systems

FIX:

The following two scripts (one for Windows and one for Unix) will attempt to quiet the database and then will loop to check the status of the quiet point and won't proceed till the return code of 8 is given indicating that the quiet point has been enabled.

These scripts are examples and should be rigorously tested prior to incorporation into existing production environments.

On Windows the following script will attempt to enable a proquiet and will check repeatedly approximately every 4 seconds to see if the quiet point is enabled.

On Windows
:startit
call proquiet prog102b enable
if not ERRORLEVEL 8 (
ping 5
goto :startit
) else (
goto :quit
)
:quit
echo Proquiet has been enabled.
REM <Do whatever scripting you need to perform here while quiet is enabled.>
call proquiet prog101c disable

On Unix the following script will attempt to enable a proquiet and will check repeatedly approximately every 5 seconds to see if the quiet point is enabled.
#!/bin/sh
proquiet prog101c enable
ret=$?
echo Return is $ret
while [ $ret -ne 8 ]
do
sleep 5
proquiet prog101c enable
ret=$?
done
echo Proquiet has been enabled.
#<Do whatever scripting you need to perform here while quiet is enabled.>
proquiet prog101c disable