Page 1 of 1

Help- FTP update of a flat file (TSO)

PostPosted: Wed Apr 15, 2015 7:33 am
by arnyjk
Hello, I'm a student/intern and am something of a beginner at mainframes. I have a situation where I am supposed to update an existing flat file on an IBM mainframe through ftp while using a module in Visual Basic. However, that flat file does not seem to be updating. But if I write to a completely new flat file, the data goes through but with half the columns cut off.

Any assistance would be appreciated. If you need any more information, let me know

Re: Help- FTP update of a flat file (TSO)

PostPosted: Wed Apr 15, 2015 8:25 am
by Robert Sample
You could have posted the FTP commands you are using, along with the characteristics of the mainframe data set. If you create a new mainframe data set, you need to fully specify the data set (LRECL, BLKSIZE, SPACE, DSORG, RECFM) in your FTP commands or your data set will not be created to your specifications. If putting data in an existing data set, are you getting any messages from the FTP session? Mainframe data sets can disallow updates, for example, depending on the security defined.

Re: Help- FTP update of a flat file (TSO)

PostPosted: Wed Apr 15, 2015 6:51 pm
by arnyjk
Thanks for your response.

This is the operation performed by visual basic when calling FTP in my program:

Shell("ftp -n -v -i -s:""" & "\\File\Directory\Location\Folder\blah.txt "" our.mainframe.server.here.com", vbMinimizedNoFocus)

Here are the contents of blah.text:

user Username password
put
"\\File\Directory\Location\Folder\DATA.txt"
'My.Mainframe.Location.Flatfile'
bye

Unfortunately I can't give you any messages from the FTP session, as I don't rememeber them from yesterday (wish I had documented that) and am not sure I am allowed to try to make changes to the mainframe right now.

Re: Help- FTP update of a flat file (TSO)

PostPosted: Wed Apr 15, 2015 7:55 pm
by steve-myers
One obvious possible problem is you are not supplying the URL of the mainframe FTP server anywhere.

Re: Help- FTP update of a flat file (TSO)

PostPosted: Wed Apr 15, 2015 8:15 pm
by arnyjk
steve-myers wrote:One obvious possible problem is you are not supplying the URL of the mainframe FTP server anywhere.


Sorry, I thought that was what "our.mainframe.server.here.com" was referring to.

Re: Help- FTP update of a flat file (TSO)

PostPosted: Wed Apr 15, 2015 10:02 pm
by steve-myers
Oh, sorry. I missed it.

I think your FTP text file is OK, but I do not have access to a mainframe FTP server and it's been a long time since I did. Does it work when you try it from a CMD window prompt?

Somehow there is something that does not look right in your shell( -- ) but I have no way to check it out myself.

Re: Help- FTP update of a flat file (TSO)

PostPosted: Thu Apr 16, 2015 1:22 am
by arnyjk
steve-myers wrote:Oh, sorry. I missed it.

I think your FTP text file is OK, but I do not have access to a mainframe FTP server and it's been a long time since I did. Does it work when you try it from a CMD window prompt?

Somehow there is something that does not look right in your shell( -- ) but I have no way to check it out myself.


I can't update 'My.Mainframe.Location.Flatfile' with the data from the new text file from command line either.

Re: Help- FTP update of a flat file (TSO)

PostPosted: Thu Apr 16, 2015 3:55 am
by Robert Sample
Did you post exactly what you're doing? If so, have you researched whether or not your version of FTP even allows for line continuations the way you have split up the PUT subcommand? On the mainframe, a + can be used to indicate that a subcommand continues to the next line, but that is not necessarily true for Windows (or other platform) FTP clients. You may have to have the PUT <local file name> <remote file name> all on a single line.

Showing us the FTP output would VASTLY help in figuring out what is going on; especially when you use the -v option to get verbose output.