Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Capture FTP Error Code in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
mrgnndhmk

New User


Joined: 01 Feb 2006
Posts: 49
Location: India

PostPosted: Mon Jun 08, 2009 5:13 pm    Post subject: Capture FTP Error Code in JCL
Reply with quote

Hi All,

We have a requirement where in we have to capture the FTP Error code in JCL.



Generally, we receive only the return code as 004, 008 or 012 as return code. But we want to capture the exact error code of FTP commands getting executed in FTP server like 550, 552 etc. In JCL we capture this error code and send a mail to the user with the description of the error code.

Can somebody advice me whether it is possible to capture error codes to JCL from FTP Server.

Regards,
Muruganandham k
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Mon Jun 08, 2009 5:36 pm    Post subject:
Reply with quote

Yes and no. You can use the (EXIT parameter on the EXEC PGM=FTP JCL statement to get the return code set. However, it will not be 550, 552, etc -- it will be a value determined by the FTP command you executed, combined with the FTP return code for that command, modulo 4096.

For example, a GET command is code 16, which gets a 550 return code has these values combined to make 16550. 16550 modulo 4096 is 0166. The JCL return code will be set to 0166. This is all covered in the Communications Server manual.
Back to top
View user's profile Send private message
mrgnndhmk

New User


Joined: 01 Feb 2006
Posts: 49
Location: India

PostPosted: Mon Jun 08, 2009 6:03 pm    Post subject:
Reply with quote

Hi,

Thanks for the explanation. Do you mean to say, the return code of the step will be set to modulo 4096?

I am working in VSE environment. I use two program for FTP.
1. FTP (as you mentioned)
2. ZIPVSE (to zip and FTP)

We always get the return code as 008 when there is a problem with the FTP step. We check the return code of the step and when it is more than zero we cancel the job.

Regards,
Muruganandham k
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Mon Jun 08, 2009 6:13 pm    Post subject:
Reply with quote

Are you using the (EXIT parameter on your FTP? I don't deal with any VSE environments so I cannot tell you the differences between z/OS and VSE.
Back to top
View user's profile Send private message
mrgnndhmk

New User


Joined: 01 Feb 2006
Posts: 49
Location: India

PostPosted: Mon Jun 08, 2009 7:58 pm    Post subject:
Reply with quote

Hi,

We don't use EXIT parameter in our JCL. I checked whether it can be used but the JCL failed giving "parameter not found".

This is how the step is constructed

/. STEP004
* WST601D0 / STEP004 / FTP / BACKUP THE FILES
/* RESTART: HERE
// EXEC PROC=FTP
// EXEC FTP,PARM='IP=XXX.XXX.XXX,RETRY=02'
USERID
PASSWORD
FNCDOC
DOCFNC1
ASCII
COMMAND DEL QST601.ZIP-8
COMMAND RENAME QST601.ZIP-7 QST601.ZIP-8
COMMAND RENAME QST601.ZIP-6 QST601.ZIP-7
COMMAND RENAME QST601.ZIP-5 QST601.ZIP-6
COMMAND RENAME QST601.ZIP-4 QST601.ZIP-5
COMMAND RENAME QST601.ZIP-3 QST601.ZIP-4
COMMAND RENAME QST601.ZIP-2 QST601.ZIP-3
COMMAND RENAME QST601.ZIP-1 QST601.ZIP-2
COMMAND RENAME QST601.ZIP QST601.ZIP-1
QUIT
/*

When I use EXIT parameter in the parameter field it gave return code 0016

FTP107W Unidentifiable information found in parm

FTP106I Processing of parm override complete

FTP104E Parameter errors found

FTP103E TCP/IP -- FTP Client -- Failure

1S55I LAST RETURN CODE WAS 0016

Can somebody help?

Regards,
Muruganandham k
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Mon Jun 08, 2009 8:02 pm    Post subject:
Reply with quote

Code:
// EXEC FTP,PARM='IP=XXX.XXX.XXX,RETRY=02 (EXIT'
is the format I'm familiar with -- what did you code on your parameter?
Back to top
View user's profile Send private message
mrgnndhmk

New User


Joined: 01 Feb 2006
Posts: 49
Location: India

PostPosted: Tue Jun 09, 2009 1:07 pm    Post subject:
Reply with quote

Hi,

I use the same format but get the same error

// EXEC FTP,PARM='IP=xx.xx.xx,RETRY=02 (EXIT'

1S54I PHASE FTP IS TO BE FETCHED FROM PRD1.TCP150F
FTP100I TCP/IP -- FTP Client -- Version 01.05 F , 11/29/07

FTP101I Copyright 1995, 2008 (C) Connectivity Systems Inc.

FTP105I Processing the execution parm override

FTP131I Retry Counter is set to 2

FTP107W Unidentifiable information found in parm

FTP106I Processing of parm override complete

FTP104E Parameter errors found

FTP103E TCP/IP -- FTP Client -- Failure

1S55I LAST RETURN CODE WAS 0016


Your help is much appreciated.

Regards,
Muruganandham k
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Tue Jun 09, 2009 4:54 pm    Post subject:
Reply with quote

You should contact your site support group. I don't have much experience with VSE, and no system to test on, so I'm pretty much out of ideas.
Back to top
View user's profile Send private message
mrgnndhmk

New User


Joined: 01 Feb 2006
Posts: 49
Location: India

PostPosted: Thu Jun 11, 2009 10:19 am    Post subject:
Reply with quote

Thanks for the help with the information. I am contacting our support group.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us