Help- FTP update of a flat file (TSO)



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

Help- FTP update of a flat file (TSO)

Postby arnyjk » Wed Apr 15, 2015 7:33 am

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
arnyjk
 
Posts: 4
Joined: Wed Apr 15, 2015 6:44 am
Has thanked: 0 time
Been thanked: 0 time

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

 

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

Postby Robert Sample » Wed Apr 15, 2015 8:25 am

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

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

Postby arnyjk » Wed Apr 15, 2015 6:51 pm

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.
arnyjk
 
Posts: 4
Joined: Wed Apr 15, 2015 6:44 am
Has thanked: 0 time
Been thanked: 0 time

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

Postby steve-myers » Wed Apr 15, 2015 7:55 pm

One obvious possible problem is you are not supplying the URL of the mainframe FTP server anywhere.
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

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

Postby arnyjk » Wed Apr 15, 2015 8:15 pm

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.
arnyjk
 
Posts: 4
Joined: Wed Apr 15, 2015 6:44 am
Has thanked: 0 time
Been thanked: 0 time

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

Postby steve-myers » Wed Apr 15, 2015 10:02 pm

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.
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

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

Postby arnyjk » Thu Apr 16, 2015 1:22 am

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.
arnyjk
 
Posts: 4
Joined: Wed Apr 15, 2015 6:44 am
Has thanked: 0 time
Been thanked: 0 time

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

Postby Robert Sample » Thu Apr 16, 2015 3:55 am

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post