Skip to Content
author's profile photo Former Member
Former Member

Fixed length & semi colon both at a file

Hi Master,

I am working on Proxy to flat-file, Its working file....

Right now flat-file structure is semi colon, its working file,

Bur now client need : Fixed length & semi colon both at a file. Is it possiable,

Please give me suggestion.. Its very urgent....

Thanks for your help,

SR

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 18, 2008 at 04:11 AM

    Hi,

    If your fields are separated by semi-colons, it doesn't really matter if your fields are of fixed or variable lengths.

    So you can directly go for field separators. i.e. specify semicolon as fieldSeparator parameter. Note that either of fieldSeparator or fieldFixedLengths parameters is mandatory.

    Edit: If you want to make sure that the target fields do not exceed a specified length, you can trim the fields in your message mapping.

    Regards,

    Riyaz

    Edited by: Riyaz Sayyad on Jul 18, 2008 9:42 AM

    Add a comment
    10|10000 characters needed characters exceeded

    • HI,

      As far as i know, you cannot have a fixed length and semicolon sperated option at the same time.

      In the mapping, you should ensure that you get the required output in exactly the same number of characters that you need.

      For that you may need to pad the field output with leading ZEROES or spaces.

      Then just use the fieldSeparator option as ";"

      Do not use both at a time, it will not work.

      Regards,

      Ravi

  • author's profile photo Former Member
    Former Member
    Posted on Jul 18, 2008 at 05:17 AM

    I don't know if both the parameters endseparator & field fixed length will work together in receiver adapter.

    What you can do is you handle the semi colon in your proxy or in mapping and then use fieldFixedLength in your adapter. Remember in this case you need to give your length one char more in FCC because of semi colon.

    As said by Riyaz to only use the semi colon if it is variable or fixed length will not work in case when the incoming file have field length of less char. For Example.

    right result if length is proper

    If fixed field length is 2,4,3

    aa;bbbb;ccc

    wrong result if length is of less char

    fixed field length is 2,4,3

    aa;b;ccc

    it should be like this..

    fixed field length is 2,4,3

    aa;b____;ccc (where underscore represents 4 spaces)

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 18, 2008 at 05:17 AM

    Hi,

    Not the fixedLenth and fieldSeperator are mandatory.

    any one is mandatory.so you can use ';' as fieldSeperator.

    Thanks,

    Madhu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2008 at 03:56 PM

    yes you can have both it is no issue what so ever.

    You simply specify both in you file adapter and all will be well.

    Just to clarify.. I have done this personally so I know for a fact that this will work.

    Edited by: Alex on Jul 21, 2008 5:56 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2008 at 08:32 PM

    You simply specify both in the receiver file adapter. so you configure it with fieldFixedLengths and fieldSeparator

    it is as simple as that 😊

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Alex,

      I done like this, but its not work, Can any body please give me any idea....

      In Content Conversion Parameters

      Recordset Structure : Details

      Details.fieldFixedlenghts :10,40,40,40,10,40,32,10,40,2,2,10,10,10,36,2,2,10,15,30,30,15,40,10,12,15,40,15,40,15,40,2,8,12,8,2,10,10

      Details.fieldSeparator ;

      Thanks.

      regrads,

      SR

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.