0.9b (c) 1995 Peter Childs
The function retrieves information about a particular network service that is started.
Syntax
MyRc = NetGetInfo(NETSERVICE, 'serviceInfo', SrvName, ServiceName)
Parameters
The parameters specified are:
'serviceInfo' The REXX variable receiving the result. The variable is divided into:
o serviceInfo.name
The service name
o serviceInfo.status
The service status. This is a uninterpreted hexadecimal value
o serviceInfo.code
The error codes when a service stops or fails to start properly. The values are a primary and secondary code
o serviceInfo.pid
The service process id
o serviceInfo.text
The service text
SrvName The server computer name
ServiceName The service name
Note
The server computer name can be specified as '' for a local server.
Example
/* Get service information */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETSERVICE = 170 SrvName = '\\FSC30DCR' ServiceName = 'ALERTER' myRc = NetGetInfo(NETSERVICE, 'serviceInfo', SrvName, ServiceName) if myRc <> '0' then do say 'Got error from NetGetInfo() ' myRc call DropLsRxutFuncs exit 9 end say say 'The service name: ' serviceInfo.name say 'Service status: ' serviceInfo.status say 'Service code: ' serviceInfo.code say 'Process id: ' serviceInfo.pid say 'Service text: ' serviceInfo.text call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit 0
Example Output
The service name: ALERTER Service status: 13 Service code: 0 Process id: 67 Service text: -none-
Inf-HTML End Run - Successful