Issue with FTP



Post anything related to mainframes (IBM & UNISYS) if not fit in any of the above categories

Issue with FTP

Postby novice2erudite » Wed Nov 06, 2013 10:55 pm

Hello Everyone,

I have been facing the following issue while transferring file from Mainframe to Server via FTP using a JCL.

FTP commands used :

cd loc1/loc2/loc3
binary
SENDSITE
put 'A.B.C' x.y.z.txt
put 'E.F.G' k.l.m.txt
quit


Error Log :

EZA1736I binary
EZA1701I >>> TYPE I
200 Type set to I.
EZA1460I Command:
EZA1736I SENDSITE
EZA1611I Usage of SITE command with PUT is OFF
EZA1460I Command:
EZA1736I put 'A.B.C' x.y.z.txt
EZA1701I >>> PORT xxx,yyy,zzz,xx,yy,zz
501 Server cannot accept argument.
EZA1701I >>> STOR x.y.z.txt
150 Opening BINARY mode data connection.
EZA2589E Connection to server interrupted or timed out. Waiting for data connection
EZA1636I *** I can't open a data-transfer connection:
425 Cannot open data connection.
EZA2108I Confidence=Low for PUT of A.B.C
EZA1460I Command:
EZA1736I put 'E.F.G' k.l.m.txt
EZA1701I >>> STOR k.l.m.txt
150 Opening BINARY mode data connection.
EZA2589E Connection to server interrupted or timed out. Waiting for data connection
EZA1636I *** I can't open a data-transfer connection:
425 Cannot open data connection.
EZA2108I Confidence=Low for PUT of E.F.G
EZA1460I Command:
EZA1736I quit
EZA1701I >>> QUIT
221 Goodbye.
******************************** End of report *********************************

where A.B.C and E.F.G are mainframe files
x.y.z and k.l.m are text files
loc1/loc2/loc3 is the location in the server
and PORT xxx,yyy,zzz,xx,yy,zz represents port number(represent sample not the original files)
Machine, User and Password are not posted in the error log

Can some one help in resolving this issue as this is hampering the progress :(

Appreciate if some one helps as early as they can.

Thanking in advance.
novice2erudite
 
Posts: 6
Joined: Wed Nov 06, 2013 11:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: Issue with FTP

Postby dick scherrer » Wed Nov 06, 2013 11:04 pm

Hello and welcome to the forum,

Why has SENDSITE been specified?

Why is BINARY specified? I suspect you want to transfer text data, so ASCII should be used.

How have you verified the target server and login id have been properly identified?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Issue with FTP

Postby Robert Sample » Wed Nov 06, 2013 11:59 pm

It looks to me like you may need to use passive instead of active mode. The BINARY is suspicious -- if the remote machine is not running z/OS, the data being sent may well be unusable on that machine (although it may be okay, for example if a PC SAS program is executed against the EBCDIC data).
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Issue with FTP

Postby novice2erudite » Thu Nov 07, 2013 12:56 am

We have verified the target server(using the ftp credentials that were part of JCL) and found that the text file is empty. We were suggested to use 'SENDSITE' and 'BINARY' commands, not sure of the usage. I read about the modes (active & passive), tried to use Passive mode by specifying PASSIVE and PASV commands which didn't work as the commands were not recognized.
novice2erudite
 
Posts: 6
Joined: Wed Nov 06, 2013 11:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: Issue with FTP

Postby dick scherrer » Thu Nov 07, 2013 1:51 am

Hello,

Suggest you create a Small text file to use for a test transmission. Suggest you Not follow the SENDSITE and BINARY suggestions.

I have never seen an attempt to send an empty file - this is detected before the ftp and the ftp is not executed if there is no data.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Issue with FTP

Postby novice2erudite » Thu Nov 07, 2013 9:47 am

Hi Dick,

We are not transmitting empty file but sending mainframe file with data. The text files which were created on FTP server found to be created but with no data(empty). I will try transmitting without SENDSITE and BINARY commands.
novice2erudite
 
Posts: 6
Joined: Wed Nov 06, 2013 11:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: Issue with FTP

Postby novice2erudite » Thu Nov 07, 2013 8:16 pm

Hi Dick,

We have retransmitted the file using FTP without 'SENDSITE' and 'BINARY' commands but still the problem persists. The SENDSITE command suppressed the following msg
'500 'SITE FIXrecfm 80 LRECL=80 RECFM=FB BLKSIZE=27920': command not understood'

In our case there will not be any empty file transmissited as the Mainframe files contains Header and Trailer even if there are no Detail records

I believe the issue is due to Auth issue or firewall on FTP server. When we checked with the team who receives the file we were told that they provide write access to the id which we use for FTP and also as they are able to receive empty file they ruled out the firewall issue.

I wonder if we have something to trace this sort of issues.
novice2erudite
 
Posts: 6
Joined: Wed Nov 06, 2013 11:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: Issue with FTP

Postby dick scherrer » Thu Nov 07, 2013 8:48 pm

Hello,

If i understand, the ftp is to take data From the mainframe and send it To an external server (not a mainframe).

'500 'SITE FIXrecfm 80 LRECL=80 RECFM=FB BLKSIZE=27920': command not understood'Keep in mind that the external server does not know things like recfm, lrecl, etc. These are only for the mainframe.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Issue with FTP

Postby novice2erudite » Fri Nov 08, 2013 6:05 pm

Hello,
Yes we are trying to fetch data From the mainframe and send it To an external server (not a mainframe). While doing so we are able to see that .txt files are getting created at FTP directory but there is no data in them (0 KB).

In logs, we are able to see time out errors.

EZA1701I >>> PORT xxx,yyy,zzz,xx,yy,zz
501 Server cannot accept argument.
EZA1701I >>> STOR x.y.z.txt
150 Opening BINARY mode data connection.
EZA2589E Connection to server interrupted or timed out. Waiting for data connection
EZA1636I *** I can't open a data-transfer connection:
425 Cannot open data connection.

Could you please suggest if this is related to some firewall/authorization issue or do we need to add any command in the script. Thanks!
novice2erudite
 
Posts: 6
Joined: Wed Nov 06, 2013 11:55 am
Has thanked: 0 time
Been thanked: 0 time

Re: Issue with FTP

Postby Ed Goodman » Fri Nov 08, 2013 7:07 pm

OK...

When you start an FTP connection, it goes to a specific port to start passing the commands back and forth. So you are talking to the server on port 21. All of the text, the commands and error messages go back and forth on that port.

When you do a STOR and RETR (put or get), FTP tries to open a SECOND port for the actual data connection. The data does NOT travel on port 21.

So, the PORT command tells the server which port the client wants to open for the data. If the port specified is not within the allowable range, you'll get the 501 error. The range has to be allowed on BOTH ends, client and server.

The ports can be firewalled off, they can simply be non-default, or they can be turned off for security.

Another issue is SSL. If you are trying to talk to a normally Secure (sFTP) server, it could be encrypting the control channel and simply can't read the command.

More reading:
http://forums.iis.net/t/1157854.aspx

Try this... use your PC command prompt to try and move some data. Turn on TRACE and VERBOSE and see what works and what doesn't.
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times


Return to All other Mainframe Topics

 


  • Related topics
    Replies
    Views
    Last post