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.  Type Tree issue....

    Posted 10/29/07 11:05 AM

    Originally posted by: SystemAdmin


    Type Tree issue....

    This pretty much a fundamental question in which I found a resolution, but it would really be helpful for me to understand this, because I've hit it so many times. .

    I have an input file that contains a main loop, which contains a Header, and a number of detail records. I want to split all the main loops and put them into there own file, so rather then define each of the records (D010, D020,D030, etc) I did it generically.

    File:
    MainLoop(s)
    Header initiator = "H001"
    RecordLoop (s)
    H010Record Initiator = "H010"
    GenericRecords(s)
    H001
    H010
    D50
    D50
    H001 <-----Second Main loop
    H010
    D50
    D50

    Basically when the file is read, it find the first Header, then it find the H010 record, and I need for it to NOT read the second "H001" as a "Generic Record". So what I do is put a component rule on it; LEFT($,4)!="H001".

    When it hits the second main loop (H001 records), it fails the component rules test, which is what I was hoping for, but rather then figure that it's the end of the first loop and it should see the data as the start of a new Main loop, it doesn't. It just figures there's an error in the data and gives me a "One or more inputs are invalid".

    I know it's kind of an oddball-ish type question, and the answer will be something like "this is just the way the engine works", but can anyone explain why it doesn't do what I want it to?

    Luckily, all the detail records start with a "D", so I put "D" as an initiator for the "Generic Records", and I'm getting the results I want.

    But that's the weird thing. If I say the generic records have to start with D, it works, but if I say "it can't start with "H001", it doesn't.

    Thanks!

    (Level 4: Offset 9387, len 91, comp 1 of 1, #1, DI 00000045:)
    Data at offset 9387 ('H001ZZUSPSSME ') was found to be of TYPE
    X'0009' (GenBlob DATA).

    (Level 4: Offset 9387, len 91, comp 1 of 1, #1, DI 00000046:)
    Data at offset 9387 ('H001ZZUSPSSME ...') failed COMPONENT RULE test
    for component number 1, TYPE X'0008' (GenericRecs DATA).

    (Level 3: Offset 9387, len 91, comp 2 of 2, #33, DI 00000046:)
    Data at offset 9387 ('H001ZZUSPSSME ') is INVALID data of TYPE
    X'0008' (GenericRecs DATA).


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


  • 2.  Re: Type Tree issue....

    Posted 10/29/07 01:26 PM

    Originally posted by: janhess


    Probably because you get the H010 records as well.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 3.  Re: Type Tree issue....

    Posted 10/30/07 04:28 PM

    Originally posted by: NancyR


    Did you try partitioning using your component rule for the headers and no component rule for the generic records?
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 4.  Re: Type Tree issue....

    Posted 11/01/07 10:02 AM

    Originally posted by: SystemAdmin


    Well, in a summerized explaination, what I needed to do what tell DataStage that this record is the end of the detail records (starts with the character "D") and that it's the start of a new loop of which there is one header (starts with the character "H") and X number of detai records. I used the component rule on the detail records that it can't start with "H". When it hit the header record, rather then say "this is not a detail record, so it must start a new loop", it said this record failed, and thus the input file is incorrect.

    I wasn't doing any mapping, just splitting up the input file, so I wanted to do it as easliy as possible, that why I avoided partintioning, I'm just not sure why it didn't do what I wanted it to. Maybe it's because it was found to be of that type, it just failed the component rule.

    Anyway, rather then just fix it like I would normally do, I can watch out for this again.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 5.  Re: Type Tree issue....

    Posted 11/01/07 11:53 AM

    Originally posted by: janhess


    Have you tried using 'Identifiers' on the different record types?
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 6.  Re: Type Tree issue....

    Posted 11/05/07 04:27 PM

    Originally posted by: SystemAdmin


    Honestly, it had been so long, that I did it wrong, putting $="D" on the field type rule, not the rec type rule, making the rec type rule $:FieldInRec="D", then setting the identifier on that type.

    I got it now!
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange