Previous Topic: SRVCALL()Next Topic: STACKINF()


SRVOPS()

This function executes an IMOD as a subroutine in an ISERVE address space. SRVOPS() operates like a standard REXX CALL instruction. An argument string can be passed, a result string is returned, and the current stack can be passed to the called routine. The modified stack is returned to the caller.

Restriction

Only use SRVOPS() in execs running under CA OPS/MVS Event Management and Automation.

Syntax

result = SRVOPS([node],[ssid],imod,[{PASS|NONE}],[args])

Parameters

result

The value that the last-executed REXX RETURN or EXIT instruction in the called routine (or error text) specified. The returned text is always padded on the left with one extra character. If no system-related errors occurred, this character is a blank. If the returned string is an error message indicating that linkage to the requested IMOD was not performed, this character is an asterisk (*).

node

Name of the GoalNet node where the IMOD is executed. The current node is the default.

ssid

Subsystem ID that identifies the CA-GSS that is to execute the IMOD.

If ssid is specified without node, the request is routed to the appropriate CA-GSS on the same z/OS system.

If ssid is specified with node, the request is first routed to the CA-GSS identified by ssid on the same system as the requester. That CA-GSS system then routes the request to the CA-GSS at node.

imod

Name of the IMOD to be executed as an external routine; required.

PASS

Passes the contents of the current stack (up to the NEWSTACK marker) to the called routine. When the information is passed, it is deleted from the stack for the caller. Upon return, any records that are left on the stack by the called IMOD are returned to the caller. These records become the new stack contents.

NONE

Specifies that no stack information is passed to the called routine. Any returned stack data is appended to the current stack contents. Select this option whenever records exist on the current stack and the called IMOD is not going to process them.

args

A string that is passed to the called routine as an argument string.

Default: NONE

Usage Notes

Return Codes

TSO/E REXX has no provision for the setting of return codes by functions. All error text that SRVOPS and its associated components generate set an asterisk in the first position. All non-error text (that returned by a successfully executed IMOD) has a single blank as the first character.

Example

x = SRVOPS('node2',,'status',,args)         /* Run "status" IMOD
                                               at node2 */
if substr(x,1,1) == '*' then signal error1  /* Check for error
                                               condition */