Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Posts
    176

    Unanswered: Breaking data into 1500 byte chunks

    Hi,

    I have a text file (5 MB). It appears as a single line in a text editor. But actually it has records of 1500 byte length each.

    I want to strip it down to 1500 byte records. So 1500*3500 = 5 MB (approx). The record size is always 1500 bytes.

    Does anyone have a script that I can run on this file to achieve this break.

    Thanks

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    You have 1 row of 5,000,000 bytes?

    There is no CR LF chars?

    Are there any delimiters?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Sep 2003
    Posts
    176
    No there are no delimiters. All I know is they are 1500 byte records. Each record has fixed column length. But all on a single line.

  4. #4
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Where did the file come from?

    An lrecl of 5mb?

    Tell them to fix the file...

    I guess you would need to write a pearl script or something...
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •