This function executes an IMOD as a subroutine in another ISERVE address space. SRVCALL() 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.
SRVCALL is TSO/E REXX-compatible and can also be used under SRVBATCH. Do not use it in an IMOD running in an ISERVE address space.
result = SRVCALL([node],[ssid],imod,[{PASS|NONE}],[args])
Parameters
If the operation was successful, this is the value the last-executed REXX RETURN or EXIT instruction in the called routine specified. Otherwise, error text is returned. 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 (*).
Name of the GoalNet node where the IMOD is executed.
Default: The current node.
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.
Name of the IMOD that is executed as an external routine. This argument is required.
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.
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.
A string that is passed to the called routine as an argument string.
Default: NONE
TSO/E REXX has no provision for the setting of return codes by functions. All error text that SRVCALL and its associated components generate sets 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 = srvcall('node2',,'status',,args) /* Run "status" IMOD at node2 */ if substr(x,1,1) == '*' then signal error1 /* Check for error condition */
Copyright © 2014 CA Technologies.
All rights reserved.
|
|