Page 1 of 1

FTP. Сheck the file transfer.

PostPosted: Fri Jul 24, 2015 12:37 pm
by crazydoc
Good day. Are there ways of checking transmission results file via FTP?
The currently used standard:
//         EXEC PGM=FTP,REGION=0K
//SYSPRINT DD SYSOUT=*           
//OUTPUT   DD SYSOUT=*           
//INPUT DD *                     
ip                 
name pass                       
LCD 'name'                       
BINARY                           
PUT file         
QUIT                             

Thanks in advance to all responded.

Re: FTP. Сheck the file transfer.

PostPosted: Fri Jul 24, 2015 12:45 pm
by BillyBoyo
What is it that you want to check? If you as a human look at the output from the JOB, does that tell you what you want, or you want something more?

Re: FTP. Сheck the file transfer.

PostPosted: Fri Jul 24, 2015 12:53 pm
by crazydoc
If make a mistake in the FTP commands(server unavailable, incorrect name / password,the transferred file is not found) - the job is not getting the error code.

Re: FTP. Сheck the file transfer.

PostPosted: Fri Jul 24, 2015 1:24 pm
by crazydoc
Probably should clarify - of course, can check in SDSF-StatusJob the progress of the job. I want to automate error handling inside job(simplest example is to send a message, if the file transfer failed), but no idea how to do it and is it possible to do it.

Re: FTP. Сheck the file transfer.

PostPosted: Fri Jul 24, 2015 5:08 pm
by Robert Sample
The PARM is used to indicate to the job what the result of the FTP was. As you have the JCL now, the result code is not transferred to the job.

Re: FTP. Сheck the file transfer.

PostPosted: Mon Jul 27, 2015 12:32 pm
by crazydoc
Robert Sample wrote:The PARM is used to indicate to the job what the result of the FTP was.

Thanks for the response. Unfortunately the second day I can not find documentation that describes FTP utility, could not advise where you can read a description of the possible values of the field PARM?

Re: FTP. Сheck the file transfer.

PostPosted: Mon Jul 27, 2015 1:08 pm
by crazydoc
Found an interesting indication of the problem and a link to the documentation:
http://ibmmainframes.com/about35022.html
Left to study.

Re: FTP. Сheck the file transfer.

PostPosted: Mon Jul 27, 2015 6:00 pm
by Robert Sample
FTP documentation is in the Communications Server bookshelf, and the IP User's Guide is probably the most helpful for what you want to know. The PARM generally consists of the IP address and (EXIT separated by a space and all enclosed in tic (single quote) marks. Both IP address and (EXIT are optional; the IP address must resolve to a server (either through the site resolver mechanism or through NETRC). See the documentation for a complete description of the PARM value possibilities.

And your original post did NOT indicate you couldn't find the FTP documentation, or we could have told you where to look then. A complete, accurate problem statement gets you better results than an incomplete statement which takes several rounds to identify the issue(s). My earlier response was based upon your having access to the documentation in the Communications Server bookshelf.

Re: FTP. Сheck the file transfer.

PostPosted: Wed Jul 29, 2015 6:11 am
by steve-myers
As Mr. Sample says, you want to use the documentation. The FTP client is documented in IP User's Guide and Commands which you can find in the Communications Server bookshelf for your z/OS release.

Reading through this documentation, it certainly appears possible to persuade the FTP client to exit with a return code that can be used in JCL. See the FTP Return codes chapter in IP User's Guide and Commands for your z/OS release. To me, the method appears rather unusual, but it should work.