SCRIPTINSTANCE()
This function checks whether a script with the specified name is currently running on the defined Agent. When using AGENT=, the request is forwarded to the named Agent. When using SSL=Y, an encrypted connection is established. The required certificate information is to be provided with ssldef (refer to SOCKETCALL - SSL_CONNECT function).
SCRIPTINSTANCE(connection, name)
connection is defined as:
HOSTNAME=ip-addr/name,PORT=port[,AGENT=ip-addr/name]
[,USER=userid,PWD=password][,SSL={Y|N}[,ssldef]]
The following return codes are possible:
- -1
- A communication error has occurred (error message in REXX variable RESULT).
- 0
- The script is not active.
- >0
- The script is active, the return code is the process ID (pid).
Example
rc = SCRIPTINSTANCE("HOSTNAME=192.168.0.231,PORT=4131", "TEST.TSF")
IF rc > 0 THEN say 'PID of script =' rc