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

Need help in FTP


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

New User


Joined: 20 Feb 2009
Posts: 51
Location: Chennai

PostPosted: Wed Nov 11, 2009 4:00 pm
Reply with quote

In my job FTP step ran with return code zero,

but the sysout of the FTP step throws the ERROR access is denied.

can anyone tell how i can abend the job if the ftp gets the error access is denied

250 CWD command successful.
EZA1460I Command:
EZA1736I PUT 'KO38PO.NUMKE.WDJ(0)' WNM_MNUEW_FIRST_YR_PREM_INFO_091110.TXT
EZA1701I >>> SITE FIXrecfm 264 LRECL=264 RECFM=FB BLKSIZE=27984
500 'SITE FIXrecfm 264 LRECL=264 RECFM=FB BLKSIZE=27984': command not understoo
EZA1701I >>> PORT 10,9,199,41,118,137
200 PORT command successful.
EZA1701I >>> STOR WNM_MNUEW_FIRST_YR_PREM_INFO_091110.TXT
550 WNM_MNUEW_FIRST_YR_PREM_INFO_091110.TXT: Access is denied.
EZA1460I Command:
Back to top
View user's profile Send private message
LearningDb2

New User


Joined: 19 Jun 2009
Posts: 40
Location: India

PostPosted: Wed Nov 11, 2009 4:32 pm
Reply with quote

Hi,
Do you use EXIT parameter in your FTP job..
This parameter is used to exit the ftp job when an error is encountered.

You can also give the non zero mvs return codes for which the job will exit.
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: Wed Nov 11, 2009 4:48 pm
Reply with quote

I suspect your problem is the GDG reference in the PUT statement. Use a DD name reference instead -- if you read the Communications Server User's Guide and Command Reference manual, you will note that there are NO sample jobs that have a GDG transferred in the way you're doing. This is not conclusive but certainly indicative that PUT GDG(0) remotefilename is not supported.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Nov 11, 2009 5:29 pm
Reply with quote

And ...

500 'SITE FIXrecfm 264 LRECL=264 RECFM=FB BLKSIZE=27984': command not understood

you guys have got to get into the habit of disabling the sending of the SITE command to servers that don't support it.
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: Wed Nov 11, 2009 5:34 pm
Reply with quote

Quote:
you guys have got to get into the habit of disabling the sending of the SITE command to servers that don't support it.
I was going to mention that, Kevin, but forgot to. SENDSITE is so easy to add to the command stream.
Back to top
View user's profile Send private message
Satheeshkumar

New User


Joined: 20 Feb 2009
Posts: 51
Location: Chennai

PostPosted: Thu Nov 12, 2009 1:12 pm
Reply with quote

Please find the INPUT CARD for the ftp

servername.com
id
password
CD WDJ
PUT 'KO38PO.NUMKE.WDJ(0)' TEST.TXT
CLOSE
QUIT

After executing FTP step throws return code zero, sysout of the FTP step has the error message access is denied. but the file was not transfered to the server.

can anyone tell me how to abend the FTP step, when the ftp step gets the access is denied error message.
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: Thu Nov 12, 2009 5:53 pm
Reply with quote

Quote:
can anyone tell me how to abend the FTP step, when the ftp step gets the access is denied error message.
Without seeing the exact JCL you are using (you can change the IP address to protect it), no.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Nov 12, 2009 7:28 pm
Reply with quote

Satheeshkumar wrote:
can anyone tell how i can abend the job if the ftp gets the error access is denied


I just ran a test to see what I would take to make the same event occur. If I run the FTP program without any EXIT parameters, it ends with RC=0 regardless of what happens, which is what's supposed to happen:

4.11 FTP return codes.

By adding either PARM='(Exit' or PARM='(Exit=4' I get a non-zero return code back for the 550 FTP Error Message. Now, neither of these is going to cause a job abend as you've requested. But, you can then code a subsequent step, based on your FTP step return-code, to force the abend. Or, preferably, you can setup your schedule to indicate a job failure for the non-zero return-code.
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

 


Search our Forums:

Back to Top