By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,301 Members | 1,766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,301 IT Pros & Developers. It's quick & easy.

call AS/400 program from ASP.Net

P: n/a
Dear all,

In our AS400 system, there is a program, 'PrgSend" located in MyLib library.
That program only reads from PF file that comes from FTP, "TMPData" and sends data to Real table.

I have the menu program with this command :

0001 RUNQRY *N TMPData
0002 call PrgSend
0003 WRKSPLF SELECT(*CURRENT *ALL *ALL PrgSend)
0009 s

In .Net, I only want call PrgSend to read PF file.
I create looping in a folder to read CSV files, than send those files use FTP and go to TMPData.
After that, .Net call PrgSend to send TMPData to Real table.

I tried these code in .Net :

Dim AS400Name As String = "110.114.30.02"
Dim AS400User As String = "AMIN"
Dim AS400Password As String = "Password"
Dim AS400Pgm = "PrgSend"
Dim AS400Lib = "MyLib"

Dim AS400 As New cwbx.AS400System
Dim program As New cwbx.Program

AS400.Define(AS400Name)

program.system = AS400
program.system.UserID = AS400User
program.system.Password = AS400Password

program.LibraryName = AS400Lib
program.ProgramName = AS400Pgm

AS400.Signon()
AS400.Connect(cwbcoServiceEnum.cwbcoServiceRemoteC md)
program.Call()

But doesn't work. It was draweed in this code : AS400.Define(AS400Name)

So, could anyone help me to solve the problem ?

Thanks and Regards,

Kusno.
Oct 24 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
<Kusno Doangwrote in message news:20*****************@telkom.net...
But doesn't work. It was draweed in this code : AS400.Define(AS400Name)
Could you rephrase that last statement? I don't understand it at all.

And what is the Define() method supposed to do?
Oct 24 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.