| | | Forum Newbie
       
Group: Forum Members Last Login: 12/8/2005 10:53:00 AM Posts: 5, Visits: 1 |
| I'm using the SDK (8.01) in a VB application that transfers files to our Mainframe. At the end of the transfers, I need to submit a JCL stream to the Mainframe's internal reader. Everything I read in the SDK docs indicates that the PUTFILE command requires all 4 pieces (OrigDir,OrigFile,DestDir,DestFile) but in order for this to work, I need to be able to do a 'simple' put command - i.e. put OrigDir,OrigFile I'm using the SendCommand to send 'site filetype=JES' - which works. I then tried the 'simple' put above in 'standard' FTP format: 'put c:\folder\filename.txt' and the SendCommand returned an error: 500 unknown command PUT Am I just not seeing the correct command or am I just out of luck? Thanks, Mike |
| | | | Time Traveler
       
Group: Ipswitch Employees Last Login: Today @ 4:27:41 PM Posts: 228, Visits: 1,379 |
| Mike, The error you are getting is from your server, because it does not understand the PUT command. This is usually the case because the PUT command is interpreted on the client side. Clients execute a PUT command aproximate in the following steps: 1. Establishing a new TCP connection with the server, in port or pasv mode 2. Issuing a STOR command 3. Transferring the whole source file through the new TCP connection. Hope this help. Claudio Robles WS_FTP Team Ipswitch |
| | | | Forum Newbie
       
Group: Forum Members Last Login: 12/8/2005 10:53:00 AM Posts: 5, Visits: 1 |
| So after I issue the site filetype=JES I'd then do a SendCommand: STOR C:\filename.ext ? |
| | | | Forum Newbie
       
Group: Forum Members Last Login: 2/12/2008 10:54:58 AM Posts: 7, Visits: 8 |
| Here is the way that I do it in one of the programs that I use to generate and upload the JCL directly to the JES reader. papi.LogToFile True, "c:\DCCFTP.txt" Set pConn = papi.CreateConnection(txtServerAddress, txtMFUserID, frmMain.txtPassword, WsftpConnectionTypes.WSFTP_CT_FTP,21) pConn.SendCommand ("site lrecl=80 filetype=jes") pConn.PutFile txtJCLPath, "FTP.JCL", "/", "FTP.JCL", WSFTP_TFF_ASCII, 0 Set pConn = Nothing Set papi = Nothing ' - - - - - - - - - - - - - - - - ' Get JES Job Number from FTP Log ' - - - - - - - - - - - - - - - - freefile1 = FreeFile Open "c:\DCCFTP.txt" For Input As #freefile1 Do While Not EOF(freefile1) Line Input #freefile1, sline If Left$(sline, 29) = "250-It is known to JES as JOB" Then frmMain.txtJESJOB = jobname + " (" + Right$(sline, 8) + ")" End If Loop Close #freefile1 |
| |
|
|