Consultor Eletrônico



Kbase P126785: 4GL/ABL: How to check the status of an AppServer using 4GL?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   18/04/2011
Status: Verified

GOAL:

4GL/ABL: How to check the status of an AppServer using 4GL?

GOAL:

How to run the asbman.bat to query the AppServer using 4GL?

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.x
OpenEdge 10.x

FIX:

Use the 4GL/ABL OS-COMMAND statement in conjunction with the asbman command to query the status of the AppServer, redirect the output to a file and parse the output file. For example, the following code queries the asbroker1 and redirects the result of the query to a file named result.txt.
DEFINE VARIABLE cCommandLine AS CHARACTER NO-UNDO.
DEFINE VARIABLE cExecutable AS CHARACTER NO-UNDO.
ASSIGN
cExecutable = SEARCH("asbman.bat")
cCommandLine = cExecutable + " -query -i asbroker1 > result.txt".
OS-COMMAND SILENT VALUE(cCommandLine).
The file named result.txt generated by the above code may be parsed to determine whether the AppServer is running or not. This method may be used regardless whether the AppServer is on the same machine as he 4GL client or on a remote one. All what needs to be modified is the asbman command line.