17
remote programs and commands In this presentation… rpc concepts rpc connections rpc actions

Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

Embed Size (px)

Citation preview

Page 1: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

remote programs and commands

• In this presentation…

– rpc concepts– rpc connections– rpc actions

Page 2: 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)

Page 3: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

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

Page 4: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

remote programs and commands

• RPCDeclare

– used to define a remote program or procedure– similar to Declare and WebDeclare

Page 5: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

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

Page 6: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

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

Page 7: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

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

Page 8: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

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

Page 9: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

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

Page 10: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

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

Page 11: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

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

Page 12: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

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.

Page 13: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

remote programs and commands

• RPCDisconnect

– disconnects from the remote server– connection can be left open for multiple commands

and procedure calls

Page 14: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

remote programs and commands

• RPCDisconnect arguments

– Connection• name of the connection to close

Page 15: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

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

Page 16: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

centric 8 Training

Workshop 8

Page 17: Remote programs and commands In this presentation… –rpc concepts –rpc connections –rpc actions

This page is intentionally left blank.