View previous topic :: View next topic
|
Author |
Message |
ranjanp
New User
Joined: 02 May 2006 Posts: 25
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
If the target file is not predefined on the host in my experience FTP defaults to 80 character records. |
|
Back to top |
|
|
ranjanp
New User
Joined: 02 May 2006 Posts: 25
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|