I need to FTP a CSV/.txt file from the Maniframe to Local machine.
I DONT want to FTP to Abacus then to Local machine But I need directly to loacla machine.
It will be great if some one has a tested script that I can use.
Thanks
Praveen
JCL-I need to FTP from MF to Local computer
Moderators: Frank Yaeger, DikDude, Moderator Group
-
- Member
- Posts: 12
- Joined: Tue Oct 14, 2008 12:15 pm
-
- Member
- Posts: 12
- Joined: Tue Oct 14, 2008 12:15 pm
I don't care about Abacus. I asked for a copy of an FTP session from the mainframe to this "Local Machine". I'd like to see some proof that you have the RACF or ACF/2 authority to execute FTP (doubtful) and that this "Local Machine" is configured for FTP access with a static TCP/IP address and/or domain name (again, doubtful), has an active FTP daemon, that you have an appropriate access logon id and password, and that your network configuration will allow the connection between the two machines.
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
I agree with MrSpock -- You probably cannot send a file from the mainframe to your PC using FTP via a batch job (JCL) unless your PC is running as a(n) "FTP server" so the mainframe could connect; using personal PC as FTP server is most unlikely.
Last edited by Anuj Dhawan on Thu Aug 20, 2009 10:33 am, edited 1 time in total.
Regards,
Anuj
Anuj
Anyway, you'll find all the details you need to know about the z/OS implementation of FTP in the z/OS V1R9.0 Comm Svr: IP User's Guide and Commands manual.
There's a sample FTP batch job on this page.
The basic format is:
//STEPNAME EXEC PGM=FTP,PARM='x.xx.xx.x 21 (EXIT'
where x.xx.xx.x is the TCP/IP address or domain name of the FTP server you are connecting to. 21 is the port number, and that is a standard port number for FTP, but it can vary so check with the Admin for your FTP server. You can direct FTP to exit on error with a nonzero return code by specifying the EXIT or EXIT=nn parameter on the FTP command.
//NETRC DD DSN=HLQ.NETRC,DISP=SHR
You can use the NETRC dataset, as defined by the NETRC DD statement , to identify the user ID and password for a batch-processed remote login. You can also specify the user ID and password in the INPUT DD data set.
//SYSFTPD DD DSN=HLQ.FTP.DATA
is an optional DD for a dataset that contains default configuration settings for FTP sessions.
//OUTPUT DD SYSOUT=*
Standard DD for your output messages. You can use SYSPRINT DD in place of the OUTPUT DD statement.
//INPUT DD
Specifies the input FTP commands.
A typical FTP input datastream might consist of the following commands:
>userid (if not already supplied in the NETRC dataset)
>password (ditto)
>sendsite (turn off the SITE command)
>ls (list files on the server)
>dir (directory of files on the server)
>cd (change directory on the server)
>lcd (change directory on the local site)
>put local-file target-file
>get target-file local-file
>quit
There's a sample FTP batch job on this page.
The basic format is:
//STEPNAME EXEC PGM=FTP,PARM='x.xx.xx.x 21 (EXIT'
where x.xx.xx.x is the TCP/IP address or domain name of the FTP server you are connecting to. 21 is the port number, and that is a standard port number for FTP, but it can vary so check with the Admin for your FTP server. You can direct FTP to exit on error with a nonzero return code by specifying the EXIT or EXIT=nn parameter on the FTP command.
//NETRC DD DSN=HLQ.NETRC,DISP=SHR
You can use the NETRC dataset, as defined by the NETRC DD statement , to identify the user ID and password for a batch-processed remote login. You can also specify the user ID and password in the INPUT DD data set.
//SYSFTPD DD DSN=HLQ.FTP.DATA
is an optional DD for a dataset that contains default configuration settings for FTP sessions.
//OUTPUT DD SYSOUT=*
Standard DD for your output messages. You can use SYSPRINT DD in place of the OUTPUT DD statement.
//INPUT DD
Specifies the input FTP commands.
A typical FTP input datastream might consist of the following commands:
>userid (if not already supplied in the NETRC dataset)
>password (ditto)
>sendsite (turn off the SITE command)
>ls (list files on the server)
>dir (directory of files on the server)
>cd (change directory on the server)
>lcd (change directory on the local site)
>put local-file target-file
>get target-file local-file
>quit
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
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page