Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.9k views
in .NET FTP by (200 points)
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

4 Answers

0 votes
by (162k points)
It looks ok - what's the actual error you are experiencing? It's probably best to enable debug level logging and post the relevant log file.
0 votes
by (200 points)
Thank you for the quick response. I don't get an error. If I pad the remote JCL filename with xxxxxxxxxxx's I get an error stating that that the filename on the host side is invalid...so it does seem to be trying to do something. I'll post that message at the bottom...but it's probably not terribly relevant. I know the JCL file is making it to the mainframe...it's just not executing. I will dig into enabling logging. I haven't done that yet...if there's a good link to send me to or some basic code to insert please let me know...otherwise I will start looking for help on turning on logging.

Thank you again for your help.

ER


Error I get when I muck up the host jcl filename:

An unhandled exception of type 'EnterpriseDT.Net.Ftp.FTPException' occurred in edtFTPnet.dll

Additional information: Invalid data set name "PRDJCL2Pxxxxxxxxxxxxx". Use MVS Dsname conventions.
0 votes
by (162k points)
There's a how to on logging in the User Guide.
0 votes
by (200 points)
Thank you for all the quick responses. I would have posted this resolution sooner but for some reason on my main computer using IE I haven't been able to log in for several days....it finally dawned on me to try another computer another browser.

When I did the log I saw that after the : ---> QUOTE SITE FILETYPE=JES I was getting : 500 unknown command QUOTE

What I did was remove the QUOTE and just entered:

ftpNFC.InvokeFTPCommand("SITE FILETYPE=JES");

That seems to work.

Thanks again for all the help.

ER

Categories

...