Setup FTP from Mainframe to Non-Mainframe –Method I using Filezilla server on Windows

In this series, I’m going to cover the methods used for FTPing files from Mainframe to Non-Mainframe Platform.  Initially I’ll cover the processes to FTP from Mainframe and later I’m planning to cover the advanced topics like Secure FTP and FTF Methods.

The biggest Challenges while FTPing file from Mainframe are

In Mainframe Files are in EBCDIC format and Non-Mainframe platforms are in ASCII, so if you FTP files with packed Decimals in it (COMP, COMP-1, COMP-3 etc), Target system will not be able to read them properly, SO you need to unpack the fields before you transfer them over FTP

When Transferring Variable length (VB) files (Files with Occurs depending on fields in copybook) , the destination program has to modify to read the counter variable from File and then iterate to read the field. Another solution is that you can change the variable length record to Fixed length record prior to transmitting the file.

You could also read other methods I’ve written about FTP’ing files from IBM Mainframe to Windows. These methods are easy to use and utilizes the free resources available in IBM Mainframe as well as Windows/free wares.

1. Simple FTP with Windows Bat file – http://mainframegeek.me/2012/11/20/setup-ftp-from-mainframe-to-non-mainframe-method-ii-using-bat-file/

2. Setup FTP with Filezilla server.

http://mainframegeek.me/2012/09/12/setup-ftp-from-mainframe-to-personal-computermethod-i-using-filezilla-server-on-windows/

3. Setup FTP with IIS (Internet Information Service) FTP server.

http://http://mainframegeek.me/2012/11/23/setup-ftp-from-mainframe-to-non-mainframe-method-iii/

FTP uses Port 21, when you send files from zOS to Windows PC, zOS expects a FTP server listening on Port 21 at windows box. This is the bare minimum requirement for FTPing, (a client to send file and a FTP server on the receiver side). zOS has a FTP server built into it and that’s why we are able to send files from PC to Mainframe(Using Command prompt, Windows Shell is the next Method in this series).

You can use this method to transfer a single Member / a PDS or a huge list of PDS’es to Mainframe. There is no limit for the data which you can send over FTP but, it can burn down you company bandwidth Winking smile

When  you FTP a bunch of datasets, you can compress them into a single one or add as a list in the JCL. See this link to know about compressing the  dataset using IEBCOPY –http://mainframegeek.me/2011/01/20/the-iebcopy/

Step1. Make windows ready

· Step1. Download Filezilla – it’s a freeware/open-source software.

· Step2. Install

  • Just Double click on the exe file to install, accept all the defaults and click on finish.
  • Soon after the installation, filezilla server interface program will run and you will get a dialog box, just click ok. You will be on the server interface
  •  image
  • Select Edit>Groups
  • Click on Add button and enter a group name (I used “Admin”), click on ok.
  • Click on the Shared folders Node on page Pane (Left Side), then click on Add button and choose a Folder where you want your FTP’ed file to be stored into. Select all the access (read/Write/delete) and click on set as Home directory
  •  image
  • Click on ok.
  • No go back to Edit>Users
  • Click on add button, Enter a user name click on Ok and check password box and enter a password and click on ok. 9Make a note of User id and password, you need to provide this in the JCL you submit from Mainframe)
  •  image
  • Click on Ok.
  • Now your system is ready and listening to PORT 21, user id/Password will the one you created in previous step.

Step2. FTP File from Mainframe.

//DDS1764J  JOB NOTIFY=DDS1764                        
//STEP001 EXEC PGM=FTP,PARM='<your Windows machine IP> (EXIT’
//SYSPRINT  DD SYSOUT=*                               
//OUTPUT    DD SYSOUT=*                               
//INPUT     DD *                                      
<Enter your filezilla User Id>                                                     
<Enter your File zilla Password>                                               
DIR                                                   
PUT ‘<Source PDS(Member) or PDS’ ‘Target file_name.txt’  
PUT ‘<Source PDS(Member1) or PDS’ ‘Target file_name1.txt’
PUT ‘<Source PDS(Member2) or PDS’ ‘Target file_name.txt’        
QUIT
                                 &nbs
p;                                                   

Changes on the above jcl

  • Update your machine IP address on Step001. If you don’t know your system password, go the end of this webpage  – //STEP001 EXEC PGM=FTP,PARM='<your Windows machine IP> (EXIT’
  • Update Filezilla user id and password in input – in the above jcl, <Enter your filezilla User Id>, <Enter your File zilla Password>
  • Update the put command with your file list –  PUT ‘<Source PDS(Member) or PDS’ ‘Target file_name.txt’
  • Submit JCL

image

Once you submit the JCL you can monitor the log on filezilla screen.

image

Step3. Confirm reception of file.

You can see the FTP’ed file on the Filezilla Home directory (Directory you added while installing filezilla).

clip_image002[9]

 

How to Find Host IP Address sin windows Windows

  • Go to Windows Command Prompt and type “IPCONFIG” and Press Enter.
  • Scroll down till you see the IPv4 address, I have blurred my IP address in the screenshot due to security issues.
  • image

 

That’s it for the day, Guys If this tutorial helped you or if it’s a useful information then please promote my website by sharing on facebook, g+ or or by rating the page.

If you have any questions or suggestions please add it into the comment section or email me to shibuthannikkunnath@gmail.com.  For the guys who suggested the topics, please keep visiting my website, I’ll be adding them soon.

Cheers

-Shibu Thannikkunnath-

2 thoughts on “Setup FTP from Mainframe to Non-Mainframe –Method I using Filezilla server on Windows

Leave a Reply

Your email address will not be published. Required fields are marked *

13 − 1 =