[RPC] |
Remote Process Control |
CALL "[RPC:server]subprog[;entry]"[,ERR=stmtref][,arglist] | |
2. Open Remote File: |
OPEN (chan[,fileopt])"[RPC:server]filename" |
Where:
[RPC:server] |
RPC clause that initiates the remote CALL.server is the logical server name. | ||||||||||||||
chan |
Channel or logical file number to open. | ||||||||||||||
;entry |
(Optional) Entry point label. If you include a label, precede it with a ; (semi-colon) and append it to your subprogram name. | ||||||||||||||
filename |
Name of the file to open prefixed by [RPC:server]. Use a string literal as in: OPEN (14)"[RPC:server]my_file". | ||||||||||||||
fileopt |
File options. Supported options include:
| ||||||||||||||
arglist |
(Optional) One or more arguments (comma-separated if you include a list arg,arg...) to pass to the subprogram. | ||||||||||||||
server |
Name to be associated with a program server. Established using the PROCESS SERVER directive. | ||||||||||||||
stmtref |
Program line number or statement label to which to transfer control. |
The [RPC] tag is used as a prefix to denote that PxPlus is to CALL a subprogram or open a file that resides on a remote server. Before a remote process control can be initiated, the server must be identified and the server name established via the PROCESS SERVER directive.
CALL "[RPC:server]subprog[;entry]"[,ERR=stmtref][,arglist],varlist
The RPC CALL format tells PxPlus that your subprogram is to run (and that your data resides) on a different processor on the network; i.e. on a remote server. Use the same syntax as you would for a standard CALL directive, except that a [RPC:server] clause designates a remote server to handle the CALL. Since no data is transferred during RPC CALL processing, this helps maximize both network performance and data security.
At run time, PxPlus does not transfer data files or programs across the network for your RPC CALL. Instead, PxPlus puts your called remote subprogram name and parameters into a TCP/IP data packet and sends the packet to your remote server. The remote server loads and runs your subprogram, passing it your parameters. When your subprogram exits, the remote server puts your parameters (as altered by your subprogram) into a TCP/IP response packet and sends this back to the calling program.
OPEN (chan[,fileopt])"[RPC:server]filename"
PxPlus supports the OPEN directive for remote files. Prefix your filename with the [RPC:server] clause to indicate that the server is to handle file requests.
PROCESS SERVER Establish Remote Server
OPEN Open a File for Processing