Call program PROG001, passing a 4 character alpha parameter and receiving back an 80 character parameter.

     Sub cmdCall_Click ()
    Dim Prog as String
    Dim Value as String
    Prog$ = "PROG001"
    Value$ = Text1.Text
    
    ' Define the parameters to pass
    Ret% = Lce3GLDefineParameter(SessId%, 0, 0, "P", "A", 4, 0, Value$)
    Ret% = Lce3GLDefineParameter(SessId%, 1, 0, "R", "A", 80, 0, RetData$)
    
    ' Call the 3GL program
    Ret% = Lce3GLCall(SessId%, Prog$, "*LIBL", 1)
    
    ' Retrieve the parameter returned from the 3GL program
    RetData$ = String(256, 0)
    Ret% = Lce3GLGetValue(SessId%, 1, 0, RetData$)
    Label2.Caption = RetData$
End Sub
  • No labels