Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP Text File to Mainframe Data Set

Status
Not open for further replies.

kimr

Programmer
Jun 12, 2001
16
US
I currently have a process in my vb program that ftp's a text file to a mainframe data set. I do this by executing a .cmd file from the vb program and returning a return value. The .cmd file is as follows:

ftp -d -s:\\server\folder\ftptext.txt 10.9.1.2

where ftp is the ftp program that is executed and ftptext.txt is the file that contains the actual files to be ftp'd. This file is as follows:

put \\server\folder\testfile.txt 'mainframe.data.set.name'

This ftp works, but the problem is if it doesn't work for some reason it still ends up with a return code of zero. My program assumes that if the return code is zero then the ftp worked.

Is there an ftp control that I can use to send the text file to the mainframe without having to execute a command file to run an ftp program?
 
There are two options from VB that you may find useful. If the transfer is ASCII, then you should be able to use the Inet control.

If you need binary tranfer, then you have available a suite of API's that you can use.
Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top