Products Downloads


French version


 

The GsAgentDll file (or the corresponding Java class com.hardis.gts.services.GsAgentDll) allows an agent type program to query or modify the context in which the agent is run, and in particular, to set the execution state or the text of the status that is associated with the agent.

 

The functions that are used to modify the status of the agent (GSASetXXX) must be called from the client side.

 

The DLL provides the following functions :

 

GSAGetId

This function returns the ID of the agent.

It can be called from the client or server.

 

Parameter name

Type

Direction

Description

Id

NUM_BIN_4

O

Job manager ID of the agent.

 

ReturnCode

NUM_BIN_4

O

Return code:

-1  indicates that the context is invalid

 0  indicates that it completed successfully

 

 

GSAGetPid

This function returns the ID of the agent process (GSAGENT.EXE - client process). This information only applies to the machine that is running the client side of the Job manager.

It can be called from the client or server.

 

Parameter name

Type

Direction

Description

PID

NUM_BIN_4

O

ID of the GSAGENT.EXE process.

 

ReturnCode

NUM_BIN_4

O

Return code:

-1  indicates that the context is invalid

 0  indicates that it completed successfully

 

 

GSAGetName

This function returns the external name of the agent.

It can be called from the client or server.

 

Parameter name

Type

Direction

Description

Name

ALPHA(50)

O

Name of the agent.

 

ReturnCode

NUM_BIN_4

O

Return code:

-1  indicates that the context is invalid

 0  indicates that it completed successfully

 

 

GSAGetGtsName

This function returns the name of the Job manager that is running the agent.

It can be called from the client or server.

 

Parameter name

Type

Direction

Description

Name

ALPHA(50)

O

Name of the Job manager that is running the agent.

 

ReturnCode

NUM_BIN_4

O

Return code:

-1  indicates that the context is invalid

 0  indicates that it completed successfully

 

 

GSAGetState

This function is used to retrieve the current state of the agent. In particular, it allows you to check whether a request was made for the agent to be stopped (job state is 'S').

It can be called from the client or server that is connected to the Job manager database.

 

Parameter name

Type

Direction

Description

State

ALPHA(1)

O

State of the agent:

'R' indicates that the agent is currently running

'S' indicates that a stop request has been made

 

ReturnCode

NUM_BIN_4

O

Return code:

-3  indicates that an SQL error occurred

-1  indicates that the context is invalid

 0  indicates that it completed successfully

 

 

 

GSASetState

This function set the execution state of the agent. It must be called at the end of the process to indicate that the process finished normally, with errors or with warnings.

It can be called from the client only.

 

Parameter name

Type

Direction

Description

State

ALPHA(1)

I

New state of the agent:

'  '  indicates that the agent finished normally

'E'  indicates that the agent finished with errors

'W' indicates that the agent finished with warnings

 

ReturnCode

NUM_BIN_4

O

Return code:

-4  indicates that a communication error occurred

-2  indicates that the parameter is invalid

-1  indicates that the context is invalid

 0  indicates that it completed successfully

 

 

 

GSAGetStatusText

This function allows you to view the text of the status associated with the agent.

It can be called from the client or server that is connected to the Job manager database.

 

Parameter name

Type

Direction

Description

StatusText

ALPHA(250)

O

Text of the status associated with the agent.

 

ReturnCode

NUM_BIN_4

O

Return code:

-3  indicates that an SQL error occurred

-1  indicates that the context is invalid

 0  indicates that it completed successfully

 

 

GSASetStatusText

This function is used to set the text of the status associated with the agent.

It can be called from the client only.

 

Parameter name

Type

Direction

Description

StatusText

ALPHA(250)

I

Text of the status associated with the agent.

 

ReturnCode

NUM_BIN_4

O

Return code:

-4  indicates that a communication error occurred

-1  indicates that the context is invalid

 0  indicates that it completed successfully

 

 

 

GSATimedWait

This function provides a timed wait period (sleep) that is interrupted in case of a change in the agent state.

It can be called from the client only.

 

Parameter name

Type

Direction

Description

WaitTime

NUM_BIN_4

I

Wait time in seconds.

 

ReturnCode

NUM_BIN_4

O

Return code:

-1  indicates that the context is invalid

 1  indicates the wait time elapsed

 2  indicates that the wait time was interrupted (request made to stop the agent)

 

 

 

GSATimeToDeath

This function sends the wait time before the agent is stopped, if a timed stop request was made.

It can be called from the client only.

 

Parameter name

Type

Direction

Description

TimeToDeath

NUM_BIN_4

O

Wait time in seconds before suicide or -1.

 

ReturnCode

NUM_BIN_4

O

Return code:

-1  indicates that the context is invalid

 0  indicates that it completed successfully

 

 

 

Top of page


  • Aucune étiquette