IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  flat file to x12 file

    Posted Mon May 15, 2006 01:08 PM

    Originally posted by: SystemAdmin


    I'm receiving a flat file with a fixed file format. I need to convert it into an outbound x12 file.

    The input file looks something like the following:

    isa_1|gs_1|st_1|sub_1|dep_1
    isa_1|gs_1|st_1|sub_1|dep_2
    isa_1|gs_1|st_1|sub_2|dep_1
    isa_1|gs_1|st_2|sub_1|dep_1
    isa_1|gs_1|st_2|sub_2|dep_1
    isa_1|gs_1|st_2|sub_2|dep_2

    I need to ignore the redundant data in the flat file or I'll end-up with an ISA/GS/ST loop for every record. So the output should look something like below.....

    isa_1
    gs_1
    st_1
    sub_1
    dep_1
    dep_2
    sub2
    dep_1
    st_2
    sub_1
    dep_1
    sub_2
    dep_1
    dep_2

    I'm trying to have my map use the last function but having little luck... I'm running two f_maps.

    rule 1:

    make_f_map1(record:file, recordlast:file)

    rule 1 (make_f_map1):

    if(isa:current != isa:last, make_isa_loop(isa:current))

    Essentially, I'm not getting the last record processed. I'm getting the last record in the file.

    The input is simple. All fields are fixed length text, all records end with CRLF and the input passes a validation map.

    Any ideas on how to get this to work?

    jvanboga

    PS: Win2k & XP-Pro - tried both 6.7.1 & 8.0.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 2.  Re: flat file to x12 file

    Posted Mon May 15, 2006 10:01 PM

    Originally posted by: SystemAdmin


    Hello! Looks like you might want to try the control break technique here.

    This technique allows you to group input records by a specified key, using a type tree component rule to specify the grouping fields.

    Try to search on the following topic from a couple of years back, had the same type of question and have been using Control Break successfully since then.

    Compare Field on Current Record with Same Field on Previous

    The 6.7.1 help pdf, Design Studio Tutorial has this technique documented in chapters 9 and 10 as well.

    Hope this helps!

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