Flat file connection manager

  • I'm creating a flat file with a fixed length of 490 characters. Here's a snapshot from the Advanced page in the connection manager.

    I map one 490 character column to this file.

    For some reason, the file always has 12 extra bytes. The row length is 502. It was a varchar field so I tried making it char(490) but that didn't do anything. I'm stumped. Anyone have any ideas on how I can eliminate the extra 12 characters? This is happening in every flat file I create and it's always 12 extra characters regardless of the length of my record.

    "Beliefs" get in the way of learning.

  • Can you post a (simple) sample package which has this problem? I'll have a look if you do.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Not sure how to do that as I can't upload an xml file or a dtsx file.

    "Beliefs" get in the way of learning.

  • I saved the XML as a txt file. Hopefully that's good enough for you.

    "Beliefs" get in the way of learning.

  • Have you checked the generated text (for example with a hex editor) to see what the extra characters are? Are they at the beginning or end of the line. Are they row (or column) delimiters?
    Just some ideas to trouble shoot.
    HTH,
    Tim

  • Got the file, but the reason I asked for a simple package was to avoid errors like this 🙂

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Robert Frasca - Friday, December 1, 2017 10:35 AM

    I'm creating a flat file with a fixed length of 490 characters. Here's a snapshot from the Advanced page in the connection manager.

    I map one 490 character column to this file.

    For some reason, the file always has 12 extra bytes. The row length is 502. It was a varchar field so I tried making it char(490) but that didn't do anything. I'm stumped. Anyone have any ideas on how I can eliminate the extra 12 characters? This is happening in every flat file I create and it's always 12 extra characters regardless of the length of my record.

    Clearly, you have more columns in your file than the 490 character one, so you will get more than 490 characters in any given row, even if you have no column delimiters, if either of those other columns have any data, or are defined as character data of a fixed length.  Not sure how you expect a file defined that way to not leave room for the other columns.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • Uh...no. One file, one 490 column field called TextData. The file is for exchanging fixed length data records.The columns have all been concatenated into one 490 character string. This is old school.

    This package originated in SSIS 2008 and I've upgraded it to 2016. Must have forgotten to disable the package configurations.

    "Beliefs" get in the way of learning.

  • Robert Frasca - Wednesday, December 6, 2017 1:15 PM

    Uh...no. One file, one 490 column field called TextData. The file is for exchanging fixed length data records.The columns have all been concatenated into one 490 character string. This is old school.

    This package originated in SSIS 2008 and I've upgraded it to 2016. Must have forgotten to disable the package configurations.

    I was basing my statement on the picture you supplied, which showed 3 columns in the "destination".   Did you get this solved?

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply