Hi all,
I am using the free version .NET library. What is absolutely crazy is I had this working at one point...and then broke it and can not for the life of me figure it out.
First off here is the command line printout of when I do this manually. I login, then I send the command QUOTE SITE FILETYPE=JES ... then after that I upload my JCL file. I can tell that the JCL ran.
ftp> quote site filetype=jes
200 SITE command was accepted
ftp> put c:\tmp\prodjcldb2p.txt
200 Port request OK.
125 Sending Job to JES internal reader FIXrecfm 80
250-It is known to JES as JOB39709
250 Transfer completed successfully.
ftp: 206 bytes sent in 0.33Seconds 0.63Kbytes/sec.
ftp>
I have the following code set up to run my JCL attached to a button using a very simple Windows Forms app in C#:
{
string localJCLFile = "C:\\TMP\\PRODJCLDB2P.TXT";
string remoteJCLFile = "PRDJCL2P";
ftpNFC.Connect();
ftpNFC.InvokeFTPCommand("QUOTE SITE FILETYPE=JES");
ftpNFC.UploadFile(localJCLFile, remoteJCLFile);
ftpNFC.Close();
MessageBox.Show("JCL Uploaded / Executed");
}
Everything else works...I can connect, get, put files no problem. If I immediately download the JCL file PRDJCL2P after the above runs I pull down the JCL file intact...so I'm very sure that the JCL file is being sent to the server. And this is the exact same JCL file that I send manually ... so I am certain that the JCL is correct. It's as if the QUOTE SITE FILETYPE=JES is the piece that is not being invoked correctly.
So I have two main quesitons I guess:
1. Is there something very obvious that I'm doing wrong?
2. How do I use the ftpResults functionality to capture what's happening when I send the FTP commands?? I saw some threads that looked like VB (Dim ftpReply As ftpResults) ... but I didn't see how to accomplish the same thing in C#
Any direction would be greatly appreciated.
Thank you,
ER