FTP. Сheck the file transfer.



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

FTP. Сheck the file transfer.

Postby crazydoc » Fri Jul 24, 2015 12:37 pm

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.
crazydoc
 
Posts: 50
Joined: Fri Jul 24, 2015 12:27 pm
Has thanked: 2 times
Been thanked: 0 time

Re: FTP. Сheck the file transfer.

Postby BillyBoyo » Fri Jul 24, 2015 12:45 pm

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?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: FTP. Сheck the file transfer.

Postby crazydoc » Fri Jul 24, 2015 12:53 pm

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.
crazydoc
 
Posts: 50
Joined: Fri Jul 24, 2015 12:27 pm
Has thanked: 2 times
Been thanked: 0 time

Re: FTP. Сheck the file transfer.

Postby crazydoc » Fri Jul 24, 2015 1:24 pm

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.
crazydoc
 
Posts: 50
Joined: Fri Jul 24, 2015 12:27 pm
Has thanked: 2 times
Been thanked: 0 time

Re: FTP. Сheck the file transfer.

Postby Robert Sample » Fri Jul 24, 2015 5:08 pm

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.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: FTP. Сheck the file transfer.

Postby crazydoc » Mon Jul 27, 2015 12:32 pm

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?
crazydoc
 
Posts: 50
Joined: Fri Jul 24, 2015 12:27 pm
Has thanked: 2 times
Been thanked: 0 time

Re: FTP. Сheck the file transfer.

Postby crazydoc » Mon Jul 27, 2015 1:08 pm

Found an interesting indication of the problem and a link to the documentation:
http://ibmmainframes.com/about35022.html
Left to study.
crazydoc
 
Posts: 50
Joined: Fri Jul 24, 2015 12:27 pm
Has thanked: 2 times
Been thanked: 0 time

Re: FTP. Сheck the file transfer.

Postby Robert Sample » Mon Jul 27, 2015 6:00 pm

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.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: FTP. Сheck the file transfer.

Postby steve-myers » Wed Jul 29, 2015 6:11 am

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post