Upload
ferdinand-atkins
View
214
Download
0
Embed Size (px)
Citation preview
remote programs and commands
• In this presentation…
– rpc concepts– rpc connections– rpc actions
remote programs and commands
• remote programs and commands
– used to execute remote commands or programs– results of command or program can be processed
locally– similar to local programs (Call/Declare) and web
services (WebCall/WebDeclare)
remote programs and commands
• rpc connection objects
– represents a unique session to the remote server– Response property used to store message results
from commands or program calls– Server property set to RPCServerOS400 for RPC
connections
remote programs and commands
• RPCDeclare
– used to define a remote program or procedure– similar to Declare and WebDeclare
remote programs and commands
• RPCDeclare arguments
– Connection• specifies the RPC connection object to use
– Library• specifies the host library that contains the program or
procedure
– Procedure• specifies the name of the program or procedure
remote programs and commands
• RPCDeclare arguments
– Alias• specifies a local alternate name for the procedure
– Returns• specifies the return type of the procedure
– Arguments• describes the parameters used by the procedure
remote programs and commands
• RPCCall
– used to execute a remote program or procedure– procedure must have been declared with RPCDeclare
previously– connection from RPCConnect is also required
remote programs and commands
• RPCCall arguments
– Procedure• specifies the name or alias of the remote program or
procedure
– Arguments• specifies the arguments to be passed to the procedure
– Returns• specifies the variable to store the procedure’s return
value
remote programs and commands
• RPCCommand
– used to execute a remote command– an RPC connection object is required– results of the command are available through the
connection object– no declaration of the command is required
remote programs and commands
• RPCCommand arguments
– Connection• specifies the RPC connection object to use
– Command• specifies the command to be executed on the remote
server
remote programs and commands
• RPCConnect
– establishes connection to remote server– Connection String used like database connections– Connection String builder to create the string– user name and password prompted if not provided
remote programs and commands
• RPCConnect arguments
– Connection• name of the connection object to be created
– Server• must be set to RPCOS400
– Connection String• specifies the details required to connect to the server.
remote programs and commands
• RPCDisconnect
– disconnects from the remote server– connection can be left open for multiple commands
and procedure calls
remote programs and commands
• RPCDisconnect arguments
– Connection• name of the connection to close
remote programs and commands
• Finding information on OS/400 APIs
– http://publib.boulder.ibm.com/pubs/html/as400/online/homeeng1.htm
• Programming/APIs
• API Finder
centric 8 Training
Workshop 8
This page is intentionally left blank.