I want to call 400 program from my VB6 program. Here is my code:
==========================
when it acutally calls the 400 program (at last line), this VB program hangs. Could anyone tell me why???
Thank you in advance!
PHP Code:
======================
Dim MetalNet As cwbx.AS400System
Dim MetalNetPgm As cwbx.Program
Dim PgmParms As cwbx.ProgramParameters
Dim strCnvtr As cwbx.StringConverter
Set MetalNet = New cwbx.AS400System
Set MetalNetPgm = New cwbx.Program
Set PgmParms = New cwbx.ProgramParameters
Set strCnvtr = New cwbx.StringConverter
Call MetalNet.Define("mySystem")
Set MetalNetPgm.System = MetalNet
MetalNetPgm.System.UserID = "myuserid"
MetalNetPgm.System.Password = "mypassword"
MetalNetPgm.System.Connect (cwbcoServiceRemoteCmd)
MetalNetPgm.libraryName = "mylib"
If MetalNetPgm.System.IsConnected(cwbcoServiceRemoteCmd) Then
MetalNetPgm.System.Disconnect (cwbcoServiceRemoteCmd)
MetalNetPgm.System.Connect (cwbcoServiceRemoteCmd)
End If
MetalNetPgm.ProgramName = "MYPGM"
Call PgmParms.Append("PARM1", cwbrcInput, 4)
Call PgmParms.Append("PARM2", cwbrcInput, 6)
Call PgmParms.Append("PARM3", cwbrcInput, 9)
PgmParms("PARM1").Value = strCnvtr.ToBytes("2006")
PgmParms("PARM2").Value = strCnvtr.ToBytes("EIR")
PgmParms("PARM3").Value = strCnvtr.ToBytes("1100019")
Call MetalNetPgm.Call(PgmParms)
when it acutally calls the 400 program (at last line), this VB program hangs. Could anyone tell me why???
Thank you in advance!
Comment