IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Capture FTP Error Code in JCL


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mrgnndhmk

New User


Joined: 01 Feb 2006
Posts: 51
Location: India

PostPosted: Mon Jun 08, 2009 5:13 pm
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 08, 2009 5:36 pm
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: 51
Location: India

PostPosted: Mon Jun 08, 2009 6:03 pm
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 08, 2009 6:13 pm
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: 51
Location: India

PostPosted: Mon Jun 08, 2009 7:58 pm
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 08, 2009 8:02 pm
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: 51
Location: India

PostPosted: Tue Jun 09, 2009 1:07 pm
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: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue Jun 09, 2009 4:54 pm
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: 51
Location: India

PostPosted: Thu Jun 11, 2009 10:19 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
Search our Forums:

Back to Top