UNIX-Mainframe FTP



IBM OS/370, MVS, OS/390, Linux, TPF, VM/CMS, VM/ESA, VSE/ESA, z/VM, z/VSE, z/OS, z/OS.e etc...

Re: UNIX-Mainframe FTP

Postby nxkjh » Sat Nov 26, 2011 1:03 pm

FTP from Unix to mainframe is no problem provided the mainframe supports FTP and the associated TCP/IP stack. Some mainframes use EBCDIC instead of ASCII for text file so you may have to convert your data.

I assume that you want to run the script at the Unix end. For this I usually recommend using Expect to drive the FTP session. I use this to maintain my own web-site. Recently, I have come across LFTP which may be a better alternative as it includes a scripting language.

I would avoid running FTP directly from a shell script. This approach will usually work fine until the FTP session fails. Then it becomes difficult to work out was has worked and what has failed.

I have put some links below. Before downloading any of these packages you should check your Unix/Linux distribution. You may find that you already have the software.
nxkjh
 
Posts: 3
Joined: Wed Nov 23, 2011 7:48 pm
Has thanked: 0 time
Been thanked: 0 time

Re: UNIX-Mainframe FTP

Postby BillyBoyo » Sat Nov 26, 2011 3:39 pm

nxkjh wrote:FTP from Unix to mainframe is no problem provided the mainframe supports FTP and the associated TCP/IP stack. Some mainframes use EBCDIC instead of ASCII for text file so you may have to convert your data.[...]


What can you mean by all this? Why do you refer to "Unix", an Operating System, and "mainframe" a piece of hardware? The hardware does not support FTP or TCP/IP (it is hardware, those things are software) except in the vague sense that you can run software on hardware. On a mainframe, you can even run a Unix. What then of your opening sentence?

What is this "some" use EBCDIC? You are in an IBM mainframe forum. How many times have you used an IBM mainframe that does not use EBCDIC? And EBCDIC is not just for "text", nor is ASCII. You can FTP non-text files. I'm not bother to look at the original question because it is old, and the chances are that the Topic Starter has long since moved on to something else.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: UNIX-Mainframe FTP

Postby Robert Sample » Sat Nov 26, 2011 7:27 pm

1. For the last dozen and more years, EVERY mainframe operating system supports the TCP/IP stack. Implying one doesn't says that you know almost nothing about mainframes -- so why are you responding to a topic about mainframes?

2. IBM mainframes use EBCDIC, period -- not "some" of them. EBCDIC to ASCII conversion is part of FTP and automatic for text transfers. For binary transfers, there are many other issues which would have to be discussed as they arise (such as line terminators, variable length records, and non-display numbers if the mainframe originated the file).

3. z/OS supports REXEC, which allows a mainframe to initiate a Unix shell script on a Unix server. The facilities you mention would have to be installed, while REXEC is already on the mainframe as it is part of z/OS TCP/IP.

4. Production workloads generally mandate automation of everything possible -- using shell scripts and cron to do so is one way on a Unix server to do that. There are other ways, of course. But most sites do not want to dedicate a person to running an FTP of a multi-gigabyte file every day of the week.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: UNIX-Mainframe FTP

Postby steve-myers » Sat Nov 26, 2011 7:56 pm

Just to amplify Mr. Sample's post: IBM mainframes running MVS, z/OS, VM/370, z/VM, or VSE use EBCDIC. IBM mainframes running Linux use ASCII.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: UNIX-Mainframe FTP

Postby steve-myers » Sun Nov 27, 2011 11:14 am

nxkjh wrote:FTP from Unix to mainframe is no problem provided the mainframe supports FTP and the associated TCP/IP stack. Some mainframes use EBCDIC instead of ASCII for text file so you may have to convert your data. ...
The FTP standard is all text data is sent in ASCII; conversion of ASCII to EBCDIC or EBCDIC to ASCII is always done at the EBCDIC machine.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Previous

Return to Operating Systems

 


  • Related topics
    Replies
    Views
    Last post