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

Error - FTPing file - File transfer failed


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ranjanp

New User


Joined: 02 May 2006
Posts: 25

PostPosted: Wed Nov 07, 2007 9:26 pm
Reply with quote

I am trying to FTP a file to the Mainframe. I am getting the following error..

EZA1490I Error writing to data set
EZA2537E File transfer failed. File contains records that are longer than the LRECL of the new file

Please help.
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 07, 2007 9:48 pm
Reply with quote

The error seems to be extremely self-explanatory. Is there a discrepancy between the record lengths of the file versus the dataset?
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Nov 07, 2007 9:50 pm
Reply with quote

If the target file is not predefined on the host in my experience FTP defaults to 80 character records.
Back to top
View user's profile Send private message
ranjanp

New User


Joined: 02 May 2006
Posts: 25

PostPosted: Wed Nov 07, 2007 9:50 pm
Reply with quote

I am not coding any LRECL parameter for the dataset to be created. How can I know what will be the LRECL of a dataset from the file I need to FTP.
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 07, 2007 9:55 pm
Reply with quote

I would specify that the target dataset be RECFM=VB LRECL=32760, and then let the file content determine the actual length of each record. At the very least, I usually specify an LRECL that's a bit longer than any possible record in the file.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Nov 07, 2007 10:00 pm
Reply with quote

Hello,

FWIW, the pre-allocated mainframe file may have a longer lrecl than the data to be uploaded. You don't have to have an exact byte count. Saves a bunch of time when the data records to be uploaded are a few thousand bytes icon_smile.gif
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 07, 2007 10:40 pm
Reply with quote

Craq Giegerich wrote:
If the target file is not predefined on the host in my experience FTP defaults to 80 character records.


I'm not sure there's a specific default value. I belive that it's controlled by TCP/IP configuration settings in the Use [URL] BBCode for External Links dataset.

ranjanp wrote:
I am not coding any LRECL parameter for the dataset to be created. How can I know what will be the LRECL of a dataset from the file I need to FTP.


If the data is coded in ASCII, count the number of characters between the record delimiters (CR/LF). That will tell you how many bytes you'll need to properly contain each record.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Nov 07, 2007 11:41 pm
Reply with quote

Hello,

To repeat,
Quote:
FWIW, the pre-allocated mainframe file may have a longer lrecl than the data to be uploaded. You don't have to have an exact byte count. Saves a bunch of time when the data records to be uploaded are a few thousand bytes
You don't have to provide an exact count/lrecl - just make sure the mainframe allocation lrecl is long enough to handle the longest data line to be uploaded.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top