Equinox Online Help - Language Reference - A to Z

Home

ExecuteGetStatus

Applies to
SyntaxExecuteGetStatus TaskHandle
Action[Statement] Detects whether a remotely executed task has completed.
ScopeUsable anywhere
Notes

This statement checks the status of a previously executed remote task, and returns the system workareas SysError and SysResult.

The parameter TaskHandle should contain the value which was returned in SysReply after ExecuteSetMode and Execute statements were used to execute a remote task without waiting.

If the task handle is invalid or no status information exists, SysError will contain a nonzero value, and SysResult will contain -4. Otherwise SysError will contain zero and SysResult will contain one of the following:

  • -4 Operational error. The remote client is improperly configured or installed.
  • -3 Unable to execute. For example, the parameter file did not exist.
  • -2 Did not start. The remote client executed and logged in, but was unable to initialise.
  • -1 Running
  • 0 Finished ok
  • 1 Finished with an error. SysError was nonzero after the task finished in the remote client.
  • 2+ User defined result. The remote task executed a statement SysResult = value.
CategoryRemote task handling
See Also Execute, ExecuteFalTorPan, ExecuteGetStatus, ExecuteMindMeld, ExecuteSetDataIn, ExecuteSetData, ExecuteSetDataOut, ExecuteSetMode
Example

These form methods allow a query to run in the background while the operator watches the records being filled up in the query index. The Button method executes the query and selects the index which will be filled by the remote task. The NotBusy method checks that a query is running, and that no check has been made for at least a second. If so it uses the ExecuteGetStatus call to see if the query has finished.

| Variables method
handle QueryHandle
time LastNotBusy

| On this Button Method
ExecuteSetMode -1
BlankIndex qSales
Execute Query "FindSales"
QueryHandle = SysReply

if QueryHandle >= 0 then
StatusLine "Finding Sales"
SetIndex qSales
else
QueryHandle = 0
StatusLine "Cannot find sales right now"
end if

| NotBusy Method
if QueryHandle <= 0 then exit method
if LastNotBusy <= Now then exit method
LastNotBusy = Now

ExecuteGetStatus QueryHandle

if SysResult <> -1 then
StatusLine "All sales found"
QueryHandle = 0
end if