RPCDeclare
Action
Describes a routine that is defined on a remote server. After the RPCDeclare
action the routine can be called with the RPCCall
action.
Parameters
Connection -
(Required)
Specifies the connection object returned from
the RPCConnect action.
Library -
(Required)
Specifies the name of the library on the remote
server that contains the routine to be executed.
Procedure -
(Required)
Specifies the name of the routine as it is defined
on the remote server.
Alias -
(Optional)
Specifies an alternate name that you can use in
the RPCCall action.
Returns -
(Optional)
Specifies the data type of the return value from
the routine executed.
Arguments -
(Optional)
Describes the parameters required by the external
routine.
The types supported are ,
,
,
,
,
,
,
and WString.
Example
This example connects to the server and runs an RPC host command to send a message to a specified user.
open
RPCConnect (SampleConnect, RPCServerOS400, = "Network Address=" & NetworkAddress & ";Network Port=8475;Use Encryption for Data=False;Host CCSID=37;NLV=2924")
RPCDeclare (SampleConnect, *LIBL, QWCCVTDT, Format, , Input IFormat As String * 10, Input IVariable As String * 17, Input OFormat As String * 10, Output OutputVariable As String * 17, InputOutput ErrCode As String * 8)
run HourGlass (Yes)
OnError (resume)
SetValue (Result, "")
SetValue (SampleCommand, Iif(MsgType.Value, "SNDBRKMSG", "SNDMSG") & " MSG('" & Msg & "') " & Iif(MsgType.Value, "TOMSGQ", "TOUSR") & "(" & Usr & ")")
RPCCommand (SampleConnect, =SampleCommand)
SampleConnect.Response.Count < 1 SetValue (ActiveForm.Rslt, "Command executed successfully")
SampleConnect.Response.Count >= 1 SetValue (ActiveForm.Rslt, SampleConnect.Response(0))
HourGlass (No)
close OnError (disconnectError)
RPCDisconnect (SampleConnect)
StopMacro
|
See Also
RPCCall action | RPCCommand action | RPCConnect action | RPCDisconnect action
©
2004-2021 looksoftware.
All rights reserved.