Calls a Remote Program Call (RPC) routine.
object.Call(Procedure, Arguments, Returns)
Newlook Smartclient
Newlook Server
Procedure - (String, Required)
The name of the procedure to be executed or its alias as defined in the Declare method.
Arguments - (String, Optional)
The parameters to be passed to the routine.
Returns - (String, Optional)
The variable to store the return value from the external routine.
The routine must first have been declared with the Declare Method.
When passing an argument to an external routine that is declared as ByRef, you must pass a variable as the argument and not a constant. A variable is required because ByRef arguments allow the called routine to return a modified value for the argument.
The following example shows an RPC call being performed after an initial RPC Connect Method and Declare Method. VB SCRIPT'Connect to the server App.RpcConnect "SampleConnect", "Network Address=192.168.1.1;Network Port=8475;Use Encryption for Data=False;User ID=blah;Password=blah;Host CCSID=37;NLV=2924" 'Declare the RPC procedure SampleConnect.Declare "*LIBL", "QWCCVTDT", "ConvertDateFormat", "", "Input IFormat As String * 10, Input IVariable As String * 17, Input OFormat As String * 10, Output fldOutputVariable As String * 17, InputOutput ErrCode As String * 8" 'Call the ConvertDateFormat procedure. SampleConnect.Call "ConvertDateFormat", "InputFormat,InputValue,OutputFormat,OutputValue,ErrorCode", "" 'Disconnect the connection SampleConnect.Disconnect
JSCRIPT//Connect to the server App.RpcConnect ("SampleConnect", "Network Address=192.168.1.1;Network Port=8475;Use Encryption for Data=False;User ID=test;Password=test;Host CCSID=37;NLV=2924"); //Declare the RPC procedure SampleConnect.Declare ("*LIBL", "QWCCVTDT", "ConvertDateFormat","", "Input IFormat As String * 10, Input IVariable As String * 17, Input OFormat As String * 10, Output fldOutputVariable As String * 17, InputOutput ErrCode As String * 8"); //Call the ConvertDateFormat procedure SampleConnect.Call ("ConvertDateFormat","InputFormat,InputValue,OutputFormat,OutputValue,ErrorCode", ""); //Disconnect the connection SampleConnect.Disconnect; |
© 2004-2021 looksoftware. All rights reserved.