IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  Read files in two formats

    Posted 02/17/15 11:13 AM

    Originally posted by: andyzz411


    Hi All

    we have an existing map which reads incoming  files in UNIX format. Now we need to modify the same map So that  the map can read  files in DOS Format too.

    Can some one help me how to modify the map so that it can read files  in any of the above format?

     

    Thank you in Advance!


    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 2.  Re: Read files in two formats

    Posted 02/18/15 06:23 AM

    Originally posted by: Bhoju


    Make a copy of your existing group in type tree which reads the unix formatted file and declared both the group as optional. (You may think of making it partitioned as well). Modify the windows group terminators or delimitors accordingly. 


    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: Read files in two formats

    Posted 02/18/15 10:54 AM
      |   view attached

    Originally posted by: paul.brett


    A simple example of the sort of changes required are included here.

    In map Test1, the input is expected to have LF delimiters, and Input1.txt does, and so reads correctly.

    If using Input2.txt (which is delimited with CRLF) with the Test1 map, you will find that it validates OK, but each input object would also include the CR character at the end, possibly causing strange results on output.

    In map Test2, the input is expected to have a variable delimiter, defined by the Typetree object 'LineDlims' which can be either CRLF or just LF.

    Review the differences, and if you have any questions, just post a reply.

    Good luck!

    Thank-you.

    Paul

    Follow me on Twitter


    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange

    Attachment(s)

    zip
    multi_format.zip   9 KB 1 version


  • 4.  Re: Read files in two formats

    Posted 02/18/15 01:32 PM

    Originally posted by: andyzz411


    Thank you Bhoju and Paul for your Response.

    PAUL  I Am new to WTX so I am little confused.

     In the type tree  which we are using, has component syntax as fixed not delimited.

    Type syntax as literal and value is <LF>.

    So I need to make type syntax as variable and value as <LF>and <CR><LF>

    Is that what you were saying?

     

     

     


    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 5.  Re: Read files in two formats

    Posted 02/19/15 03:33 AM

    Originally posted by: paul.brett


    Yes, you've got it.

    Thank-you.

    Paul

    Follow me on Twitter


    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 6.  Re: Read files in two formats

    Posted 02/24/15 01:24 PM

    Originally posted by: andyzz411


    Thanks Paul !

    I created a new field for terminator and added as variable item.

    Thank you for your help.


    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange