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.  Comma delimiter issue:

    Posted 05/22/09 10:53 AM

    Originally posted by: malag


    I have a input where the first,third, fourth elements are testfields separated by "," delimiter.The problem is with the second field which is another group field with s occurances of a number field which are also separated by comma.So i created a type tree for this input.But when i run the map with this tree i am getting "one or more inputs are invalid" error.When i see the trace i am finding the third element also going to second group as all are delimited by commas.Can anyone suggest me how to resolve this.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 2.  Re: Comma delimiter issue:

    Posted 05/22/09 04:50 PM

    Originally posted by: repanzer


    Is there any distinguishing about field number 3, like it's alpha and the fields in the 2nd group field are numeric? Then you can put a component rule on the fields of the 2nd group in the type tree, like "ISNUMBER($)". That way when it hits a field that's alpha, it fails validation for one of those "2nd group fields", and is validated against the 3rd field as it should. It still may give you "invalid data"; you'd have to test.

    The only other way (that I can tell offhand) is to run the data through a map before the translation map, and do something like; in the first output card; COUNT(fields), which will tell you the total number of fields all together, lets say 10. Then as you map field to field (not caring about 1,2,3th, or 4th), in the rule you say "IF(INDEX(field="9"), "*"+field), field).

    This will put an * before the 3rd field.

    In your translation map, you put a terminator of * on the 2nd group of fields and then the map will know where the 2nd group of fields ends and the 3rd field continues.

    No matter what, you’re going to have to do “something”; you’re not going to be able to tell the map that one group of (S) comma delimited fields ends, and the next comma delimited field starts, if a human can’t. If the only way to know that the 2nd group of field ends is that there are only 2 fields left (3rd and 4th), that’s what you’ll have to use.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 3.  Re: Comma delimiter issue:

    Posted 05/29/09 12:43 PM

    Originally posted by: repanzer


    Did my suggestion help at all?

    Re-reading what I wrote, it should actually say;

    IF(INDEX(Currentfield=OUTPUTCARD1:FIELD-2), "*"+field), field).
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 4.  Re: Comma delimiter issue:

    Posted 06/01/09 06:46 AM
      |   view attached

    Originally posted by: malag


    Sorry rep,I was held up with othet issue lastweek hence i could not reply you back.
    I tried your first suggestion of writing a component rule Isnumber($).But as you said it could not validate the input data.
    I tried your other suggestion of keeping the * before the third field.But your logic is too high standard for me as i could not find where in my outcard i should implement the logic.I am attaching the map,tree and inputfile.If possible pl.create the output card with your logic.Please suggest a more general logic as i am not sure that i always have only 4 fields in the input.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender

    Attachment(s)



  • 5.  Re: Comma delimiter issue:

    Posted 06/01/09 10:34 AM

    Originally posted by: repanzer


    No, I'm not doing your code for you. You have enough info here, figure it out. Read the manual if you have to.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender