View previous topic :: View next topic
|
Author |
Message |
mrgnndhmk
New User
Joined: 01 Feb 2006 Posts: 51 Location: India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
mrgnndhmk
New User
Joined: 01 Feb 2006 Posts: 51 Location: India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
mrgnndhmk
New User
Joined: 01 Feb 2006 Posts: 51 Location: India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
mrgnndhmk
New User
Joined: 01 Feb 2006 Posts: 51 Location: India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
mrgnndhmk
New User
Joined: 01 Feb 2006 Posts: 51 Location: India
|
|
|
|
Thanks for the help with the information. I am contacting our support group. |
|
Back to top |
|
|
|