Hi,
Currently, I'm using Client Access components in my VB6 application to call and pass parameters to the AS400, but my company want to get a rid of client access.
Is there any other way / software to do it from VB6 application by calling the AS400 CL/RPGLE program with parameters?
Below is the code we do by using client access
===================================
as400.Define "server01"
as400.WindowHandle = hwnd
as400.UserID = "test1"
as400.Password = "test1"
as400.PromptMode = cwbcoPromptNever
as400.DefaultUserMode = cwbcoDefaultUserIgnore
as400.Signon
ConnectionASTM = "connected"
End If
as400.Connect cwbcoServiceRemoteCmd
Dim pgmDCSLOCK As New cwbx.Program
Dim Parms As New cwbx.ProgramParameters
Dim packedconv As New cwbx.PackedConverter
Dim strcvtr As New cwbx.StringConverter
Set pgmDCSLOCK.System = as400
'Test lib'
pgmDCSLOCK.LibraryName = "TEST"
pgmDCSLOCK.ProgramName = "PROGRAM1"
Parms.Clear
Parms.Append "data_string_sca", cwbrcInout, 939
Parms(1).Value = strcvtr.ToBytes(INPUTSTRING1)
=============================================
Thanks a lot!
Currently, I'm using Client Access components in my VB6 application to call and pass parameters to the AS400, but my company want to get a rid of client access.
Is there any other way / software to do it from VB6 application by calling the AS400 CL/RPGLE program with parameters?
Below is the code we do by using client access
===================================
as400.Define "server01"
as400.WindowHandle = hwnd
as400.UserID = "test1"
as400.Password = "test1"
as400.PromptMode = cwbcoPromptNever
as400.DefaultUserMode = cwbcoDefaultUserIgnore
as400.Signon
ConnectionASTM = "connected"
End If
as400.Connect cwbcoServiceRemoteCmd
Dim pgmDCSLOCK As New cwbx.Program
Dim Parms As New cwbx.ProgramParameters
Dim packedconv As New cwbx.PackedConverter
Dim strcvtr As New cwbx.StringConverter
Set pgmDCSLOCK.System = as400
'Test lib'
pgmDCSLOCK.LibraryName = "TEST"
pgmDCSLOCK.ProgramName = "PROGRAM1"
Parms.Clear
Parms.Append "data_string_sca", cwbrcInout, 939
Parms(1).Value = strcvtr.ToBytes(INPUTSTRING1)
=============================================
Thanks a lot!
Comment