I need to FTP from MF to UNIX

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
vinay
Member
Posts: 4
Joined: Fri Jan 09, 2009 2:21 am

I need to FTP from MF to UNIX

Post by vinay » Fri Jan 09, 2009 2:29 am

Hi all
Can anybody send me a sample FTP script to migrate my dataset from MF to UNIX.Do we need to write the FTP script in a JCL script, if yes please somebody share a script of that kind.

Thanks,
Vinay

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Fri Jan 09, 2009 11:20 am

Hi,

we don't have to write any jcl in mainframe.

In UNIX execute the following :
$ ftp <ip address of mainframe>

then, you will see "ftp>" prompt as shown below.
ftp>

now type below commands to transfer the file from mainframe to unix.

ftp> bin (this specifies the format of the file to be downloaded).
ftp> get < ' mainframe datasetname' > <unix filename>

Note : mainframe dataset name must be in single quotes.



'
Natarajan
Chennai

vinay
Member
Posts: 4
Joined: Fri Jan 09, 2009 2:21 am

HOw to find the Ip address of the MF

Post by vinay » Sat Jan 10, 2009 3:26 am

Hi;
Thanks for the reply. Can you please tell me how to get the Ip address of my MF server.

Thanks
Vinay

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Re: HOw to find the Ip address of the MF

Post by Anuj Dhawan » Sat Jan 10, 2009 4:52 pm

Hello,
vinay wrote:Can you please tell me how to get the Ip address of my MF server.
Use TSO HOMETEST to find the Mainfram IP. This IP Address can be used with FTP GET. ( to unload files from mainframe)
Regards,
Anuj

vinay
Member
Posts: 4
Joined: Fri Jan 09, 2009 2:21 am

MF FTP 2 UNIX

Post by vinay » Mon Jan 12, 2009 11:15 pm

Hi Natraj

Here is the following error i get .It is asking for the ID and PWD, but what i dont understand is that whicj ID and PWD should i give. I have got the same PWD for both the Mainframe & Unix. Please suggest me what kind of ID and PWd is this asking for .

$ ftp 172.24.1.1
Connected to 172.24.1.1.
220-FTPD1 IBM FTP CS V1R9 at SYSD, 13:11:09 on 2009-01-12.
220 Connection will not time out.
Name (172.24.1.1:ab69295): ab69295
331 Send password please.
Password:
530 PASS command failed
Login failed.
ftp>

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Tue Jan 13, 2009 10:21 am

Use mainframe Userid and password.
Natarajan
Chennai

vinay
Member
Posts: 4
Joined: Fri Jan 09, 2009 2:21 am

It is not working

Post by vinay » Tue Jan 13, 2009 8:52 pm

Hi Natrajan

I tried it , but it still does not work. Can you please suggest me another way . What confuses me is i think i dont have access to do an FTP in the method you had told me so . Please suggest me in any other way you know.


Thanks
Vinay

playboy049
Member
Posts: 1
Joined: Sun Feb 22, 2009 5:30 pm

Post by playboy049 » Wed Feb 25, 2009 6:14 pm

I am new to this site. Here's i am sending you the solution how to send the files from MF to UNIX Through JCL.

//JOBCARD ............
//FTP EXEC PGM=FTP
//SYSPRINT DD SYSOUT=*
//OUTPUT DD SYSOUT=*,DCB=(RECFM=FB,LRECL=160,BLKSIZE=3200)
//INPUT DD DSN=TEST.CTLCARDS(MFUNIX),DISP=SHR
/*

TEST.CTLCARDS(MFUNIX)
-----------------------
xxxxxxxxxxxxxx <--- IP address of UNIX server
abcdef <-- User ID of UNIX mail box
123abc <--- Password
put 'File name'/download <--- Path that you need to keep the file
quit

I think it will work.

Please reply me If work or not.

Thanks
Playboy

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others