Consultor Eletrônico



Kbase 21940: How To Check the Return Codes of PROUTIL Command Under DOS
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   03/04/2002
SUMMARY:

When the PROUTIL command completes, it returns a code you can test in a UNIX script or Windows batch file.

The Progress Database Administration Guide and Reference gives a UNIX script example showing how to check for these return codes. In this Solution you will find a DOS batch file example showing how to check for these same return codes.

EXPLANATION:

The return codes for the BUSY qualifier are:

0 if the Database is not in use,
6 if the Database is in use, and
64 if the Database is in the process of starting up.

SOLUTION:

@echo off
_proutil d:\wrk91c\sports2000 -C busy
if errorlevel 64 goto starting
if errorlevel 6 goto online
echo database is not connected
goto end

:starting
echo database is starting
goto end

:online
echo database is busy
goto end

:end


References to Written Documentation:

Progress Database Administration Guide and Reference