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.  Which function to use ?

    Posted 09/20/12 01:51 PM

    Originally posted by: JasonJava


    I am new to WTX. Help to get some good help from you experts.

    We have a file with the following format (fixed with). This group is optional, the line starts from 010 to 099. They are all optional line. I have a group TEST_010_099. In the component list, it was set (0:S).

    But I am not sure which function to use in the component rule in order to process the line when it starts 01-90-9.

    Is it something like WHEN(PRESENT(IF(FIND(theFirstITEM =01-90-9),true))) ?

    010....
    011....
    012...
    014...
    020...

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


  • 2.  Re: Which function to use ?

    Posted 09/20/12 05:32 PM

    Originally posted by: repanzer1


    oK, I take it English is not your first language, because I'm don't understand what you mean.

    You have a file, in that file you have a group called TEST_010_099, and in that group you have a record that can have any number of instances (0:S). Is that true? When you say the line starts from 010 to 099, do you mean each record has an initiator with values between 010 and 099? If that is true, do you mean you want to process all the records that start with the number that is greater then 10?
    If so, it would be something more like;

    EXTRACT(records, theFirstITEM > 0 )

    Which means to process all the records that start with a number greater then 0, but like I said, I'm not sure what you mean exactly.

    When you say "component rule", I think you mean a rule in the type tree, as opposed to mapping rules in the Map Designer.

    Could you explain what you are trying to do again?
    There are 10 types of people in this world. Those who understand binary and those who don't.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 3.  Re: Which function to use ?

    Posted 09/20/12 06:06 PM

    Originally posted by: JasonJava


    Thanks for the response. Sorry, I did not make myself clear enough. Let me try again.

    Yes, those lines has an initiator with values between 010 and 099. However, those lines may or may not be there. The following example only have 3 lines (010,011,014).

    It represents test results. I defined this type of test data as a group with the first 3 digits as an item within the group. Using a validation map method (input card only) to validate the data but it failed after 014 line. I just try to find out a way ask the WTX engine to stop process record using the current group format and switch to the next one since data format has changed. I thought I can do it in Component Rule with a regular expression look up.

    ...
    DSDF12123333333333333
    010125000042001275006
    011145000170001475000
    0147125NEG 7130NE4
    TTTIYYUERHJKHHJKHKHKK
    ....
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 4.  Re: Which function to use ?

    Posted 09/21/12 01:48 AM

    Originally posted by: SystemAdmin


    Hello,

    If I understand your issue correctly, I think the best would be to use a component rule that states :

    ISNUMBER ( firstItem )

    If the group following the "010-099 series" is always starting with TTT, you could also write

    LEFT ($, 3) != "TTT"

    Hope this helps
    Laurent
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: Which function to use ?

    Posted 09/21/12 03:07 PM

    Originally posted by: repanzer1


    Laurent, did you use to post under a different screen name?
    JasonJava,

    Ok, if I'm reading you correctly...you have a group which can contain two different record types. The first record type can occur any amount of times (0:s) and each has a three character numeric initiator from 010 through 099. The second record type does not have a three character numeric initiator.

    In the example data you posted, when the map ran, it read 010, 011, and 014 fine, but got an error on the next record that starts with TTT, because the map tried to validate it as the record above it, rather than know to skip to the next records definition.

    The reason this happened is because you did not have an identifier set on the record.

    You can do what Laurent suggested above and put that component rule on that field, ISNUMBER($) , but also, you have to set that field as the identifier. Open up the record's type and right click the first field and select "identifier".

    Anytime you have this issue, where the map is validating and failing on an object instead of going to the next object, it's usually this problem.

    Let us know how it goes.


    There are 10 types of people in this world. Those who understand binary and those who don't.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 6.  Re: Which function to use ?

    Posted 09/21/12 04:52 PM

    Originally posted by: JasonJava


    Repanzer1 and Laurent,

    Thanks for all the help and explanation.

    However, we have another set of data like below, ISNUMBER function will not work now.

    1st part up to 005;
    2nd part starts with 010-099 (optional as before);
    3rd part starts with 100-299 (optional as above);
    Final part always starts with 999.

    Can I use regular expression in do FIND function ? OR any better function ? Thanks again.

    ...
    004160000730001625000270016300099000163500013602125NEG 5250001600050500000020
    0050700 072501867 0750JUST TEST
    01012500004200127500630001300000040013250011000135001950001375000100014000012000
    01114500017000147500090001500000690015750002700152501150001560000140014250076000
    012160000730001625000270016300099000163500013602125NEG 5250001600050500000020
    0135225NEG 52750001036600500920005025NEG 601502532006020000560071200000060
    0147125NEG 7130NEG 8903NO 8905NO 6615013500066300080000
    015661000700006600019000066450061000
    1009850TEST ONLY
    1019300NORMAL
    1029981MAS15506055
    99999sdfsdf
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 7.  Re: Which function to use ?

    Posted 09/21/12 05:21 PM

    Originally posted by: repanzer1


    "We" have another set of data? Do you have a ring you wear that you call "precious"? ;) (that's a joke).

    Ok, any other piece of vital information you neglected to mention? You have a file with three groups of records, one that starts with a value less then 010, another group that start with a value between 010 and 099, and one that starts with text, and you want to process only the ones that start with 010 through - 099?
    Set your type tree to have three different records types and put a component rule on the first field of the first group;

    $<=5

    On the second group;

    $>9 & $<100


    There are 10 types of people in this world. Those who understand binary and those who don't.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 8.  Re: Which function to use ?

    Posted 09/21/12 05:31 PM

    Originally posted by: JasonJava


    Repanzer1,

    Thanks for the quick response. Love "Lord of the rings" movies. I know I need to pay attention to my spelling :).

    Actually, in the new file. I want to process the whole file.

    Thanks for the suggestion, I think this will work.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 9.  Re: Which function to use ?

    Posted 09/22/12 02:43 AM

    Originally posted by: SystemAdmin


    repanzer : yes, I changed my screen name, was LaurentBTY before.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange