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.  Parsing messages dynamically in WTX

    Posted 12/09/12 10:18 PM

    Originally posted by: SystemAdmin


    All,

    We are to trying to find some solution around parsing the content of a file dynamically.

    Here is the scenario,
    We have few healthcare members who send data with their own metadata(record delimiter, field delimiter, header lines, field count, end of file). Please see variations below. We want to be able to dynamically parse the message with the member specific rules. Please let me know how we can do this in WTX.

    For healthcare member 1:
    HeaderLine: 2
    RecordDelimiter: <ENTER>
    FieldDelimiter: <TAB>
    FieldCount: 5
    FieldOrder: MemberName PatientMRN encounterNumber Location Phone
    EndOfFile: EOF
    Sample message:

    From member1
    MemberName PatientMRN encounterNumber Location Phone
    MEM1<TAB>9877787<TAB>868822<TAB>GA<TAB>404-765-4567<ENTER>
    MEM1<TAB>9877319<TAB>868123<TAB>NY<TAB>214-098-1346<ENTER>

    EOF
    For healthcare member 2:
    HeaderLines: 3
    RecordDelimiter: @
    FieldDelimiter: |
    FieldCount: 5
    FieldOrder: PatientMRN MemberName encounterNumber Phone Location
    EndOfFile: EndOfFile
    Sample message:

    From member2
    Date sent at 12-05-2012 13:12:56
    Total records 3459
    9871234|MEM2|09897722|678-712-1232|TX@98722332|MEM2|9876431|861219|214-098-1346|NY@...EndOfFile
    For healthcare member 3:
    HeaderLines: 1
    RecordDelimiter: |
    FieldDelimiter: ,
    FieldCount: 5
    FieldOrder: PatientMRN EncounterNumber MemberName Location Phone
    EndOfFile: >>>End

    Sample message:

    From member3
    9871234,09897722,MEM2,TX,678-712-1232|98722332,9876431,MEM2,NY,214-098-1346|...>>>End

    In WTX, there is an option of using "variable" in each input element and assign to the syntax element which will have all possible values for FieldDelimiter, RecordDelimiter, EnOfFile, HeaderLine but the problem is it is always picking up the value as soon as it finds one of the FieldDemlimiters in the message. But the input field may contain one of the other possible values in the message.

    For example:

    Syntax element has possible values as below for FieldDelimiter -
    ,
    ;
    @

    Data for memeber 2: (rule for FieldDelimiter is |)
    St, Joseph hospital|9877787|868822|GA|404-765-4567@Birla member|9877787|868822|GA|404-765-4567@

    Here, it finds comma(,) as soon as it reads, it assigns the field delimiter as comma and so not getting the actual one we pass to it.

    How do we possibly make it assign the value that we pass to it.?
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 2.  Re: Parsing messages dynamically in WTX

    Posted 12/10/12 10:53 AM

    Originally posted by: SystemAdmin


    Hi
    Whenever you use the syntax variable you have a property Find.
    When it is set to default value No - then WTX will behave as you described (as soon as the value is assigned to the variable it will be used).
    But when you set the property to Yes - then the value of syntax variable will be determined each time.

    This can help you a bit, however when you use the syntax variable this way you must be careful as you can validate the message with three different delimiters.
    for example : field1:field2|field3@field4

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