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.  concern in reading optional data

    Posted 01/19/10 08:39 AM

    Originally posted by: SystemAdmin


    Hello all,

    I am facing a problem in validating a kind of input record which is a 1200 byte record divided in two parts by new line character, 600 bytes in each part.The second 600 byte data is optional and it may or may not come in the record.
    However the first record has initiator E2EDL24002,but we cannot give initiator for the second 600 byte part as this is the part of E2EDL24 segment but coming in the second part of the record.
    When the validation map is trying to read the data it always reads the third i.e. E2EDL41 record in place of the optional 600 byte data in E2EDL24 segment if the optional data dose not come in the input file.

    Example:

    The attached input data has the first segment E2EDL24 with initiator E2EDL24002.the size of the segment is 1200 bytes,whereas in the input data it is coming as two records 600 byte each.the second 600 byte may or may not come in the input.so E2EDL24 segment can be 600 or 1200 bytes.
    If the second record comes,the map reads the data perfectly,but if this optional part dose not come in input, it reads the E2EDL41 segment in place of the second 600 byte optional data.

    Please find the attached input data with the type tree for the reference and suggest how to proceed with the type tree to read the optional 600 byte data in E2EDL24 segment.

    Thanks in advance for your help

    Thanks and regards
    Santanu Baral
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: concern in reading optional data

    Posted 01/19/10 12:45 PM

    Originally posted by: repanzer


    If you as a human cannot know about when one type ends and one type begins, the map never will.

    The only thing telling you the second 600 bytes is actaully part of a record and not the beginning of a record, is that the first 7 bytes is not "E2EDL".

    You may have to define it as one group (full_record), with two sub-groups, first 600 bytes, second 600 bytes, where the first 600 bytes has an initiator of E2EDL, and the second has a component rule of "LEFT($,5) != "E2EDL".

    The only problem you may have is having the map know the when it reads the second 600 bytes without the E2Edl, it will know it's the second, valid 600 bytes not not fail for the component rule of LEFT($,5) != "E2EDL", thinking it the first 600 bytes of a new record.

    If that fails, partitioning the input would probabaly work. That, you'll have to read up on.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender