hi,
im new to this site,i've used the following jcl
/job......................
//step0 exec pgm=ftp,parm=' ...............' ftp server address '
//sysout dd sysout=*
//sysprint dd sysout=*
//sysin dd *
****** (project racf id) userid
given my email id in project password
pwd
ascii
cd c:\.............. (path where i want to keep file)
pwd
put 'dataset name in mf' ftp.txt
quit
/*
i've got maxcc=0 and also welcome msg that connected to server
but after password is accepted it is saying command failed
what password and userid should be specified im working in for banking project
i'm a fresher so help me
jcl to ftp mainframe ps to .txt in windows
Moderators: Frank Yaeger, DikDude, Moderator Group
I'll only offer a few comments:
1. Only the system admin of the FTP server you're connecting to can provide the userid/password details.
2. Why do you even need to know them? I'm suprised that your mainframe system admins don't have a protected file where they store all of the necessary userid/password details (identified by a //NETRC DD statement in the JCL).
3. It's usually a good idea to provide a SENDSITE command after you logon to suppress the transmission of SITE commands to the FTP server unless it absolutely requires them.
4. "cd c:\.............." doesn't look like a valid FTP "Change Directory" command to me. Go through the help commands on that server and see what they show, or check with the system admin. FTP users are rarely allowed to issue a "cd" command.
5. You don't have to "put" a dataset name. You can, if you want, "put" a reference to a DD name that, in turn, points to a dataset name. It's documented in the FTP section of the TCP/IP Users Guide.
6. Look into using the (Exit statement on the FTP program. You usually want to report back any problems or failures, and not just always accept a return-code of zero.
1. Only the system admin of the FTP server you're connecting to can provide the userid/password details.
2. Why do you even need to know them? I'm suprised that your mainframe system admins don't have a protected file where they store all of the necessary userid/password details (identified by a //NETRC DD statement in the JCL).
3. It's usually a good idea to provide a SENDSITE command after you logon to suppress the transmission of SITE commands to the FTP server unless it absolutely requires them.
4. "cd c:\.............." doesn't look like a valid FTP "Change Directory" command to me. Go through the help commands on that server and see what they show, or check with the system admin. FTP users are rarely allowed to issue a "cd" command.
5. You don't have to "put" a dataset name. You can, if you want, "put" a reference to a DD name that, in turn, points to a dataset name. It's documented in the FTP section of the TCP/IP Users Guide.
6. Look into using the (Exit statement on the FTP program. You usually want to report back any problems or failures, and not just always accept a return-code of zero.
Last edited by MrSpock on Fri Dec 31, 2010 2:28 am, edited 1 time in total.
MrSpock wrote:I'll only offer a few comments:
1. Only the system admin of the FTP server you're connecting to can provide the userid/password details.
2. Why do you even need to know them? I'm suprised that your mainframe system admins don't have a protected file where they store all of the necessary userid/password details (identified by a //NETRC DD statement in the JCL).
3. It's usually a good idea to provide a SENDSITE command after you logon to suppress the transmission of SITE commands to the FTP server unless it absolutely requires them.
4. "cd c:\.............." doesn't look like a valid FTP "Change Directory" command to me. Go through the help commands on that server and see what they show, or check with the system admin. FTP users are rarely allowed to issue a "cd" command.
5. You don't have to "put" a dataset name. You can, if you want, "put" a reference to a DD name that, in turn, points to a dataset name. It's documented in the FTP section of the TCP/IP Users Guide.
thanks for your reply
i will contact system admin to know the user id and pass word
should there be anychanges i my program for successful ftp?
can i use this pgm to ftp ps to .xlsx sheet?
If I correctly understand that by the term ".xlsx" you're referring to the Microsoft Excel proprietary file format, then my answer is no unless you have software or a program you've written that can actually create the data in that format. Usually the best you can do is to create the data in some sort of a delimited-text format, symbolic-link format, or in HTML or XML.sasanka wrote:can i use this pgm to ftp ps to .xlsx sheet?
MrSpock wrote:If I correctly understand that by the term ".xlsx" you're referring to the Microsoft Excel proprietary file format, then my answer is no unless you have software or a program you've written that can actually create the data in that format. Usually the best you can do is to create the data in some sort of a delimited-text format, symbolic-link format, or in HTML or XML.sasanka wrote:can i use this pgm to ftp ps to .xlsx sheet?
can u provide a jcl program to do multiple ftp into ms excel sheet on windows from mainframes
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