IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

EDI 863 SE01 record

  • 1.  EDI 863 SE01 record

    Posted Tue April 06, 2004 06:14 PM

    I am trying to get number of total lines from an EDI 863 document, which is to be assigned to SE01. convertToString sets a value to SE01 but number of total lines from the flat file does not match with the record count. I am wondering if I am missing anything.

    Ex.

    ST~863~000000075
    BTR~00~20040401~0000~13~GR-0631096
    NTEI HEREBY CERTIFY THAT THE MATERIAL HAS BEEN MANUFACTURED,
    NTE
    SAMPLED, TESTED, AND INSPECTED IN ACCORDANCE
    NTEWITH THIS SPECIFICATION AND HAS BEEN FOUND TO MEET
    NTE
    THE REQUIREMENTS CALLED FOR BY THE ABOVE ORDER.
    REF~PO~GR-0631096
    REF~VN~156477
    DTM~011~20031006
    N1~PV~abc co.~9~012345678
    N3~abc co. - usa
    N4~xyz~TN~12345
    PER~CE~Mr. abc ~TE~123-456-7890
    LIN~1~BP~BEPE6~HN~S31931~PO~GR-0631096
    PID~F~11~ST6" NOM STD A53-B PEB BLK 21’ U/L
    PID~F~11~ST
    Pipe Type
    REF~S3~ASTM A53-01 Gr. B
    CID68
    TMD~32~ST~015
    ~HEAT ANALYSIS
    MEA~TR~ZC~.18~P1
    MEA~TR~ZMN~.345~P1
    MEA~TR~ZP~.009~P1
    MEA~TR~ZS~.004~P1
    CID69
    TMD~32~ST~094
    ~ELONGATION PERCENT
    MEA~TR~EA~35~P1
    TMD~32~ST~090~~~TENSILE STRENGTH
    MEA~TR~TF~69200~PS
    SE~24~000000075
    GE~1~000000075
    IEA~1~000000075

    I pasted here a part of the whole document.

    Here SE01=24 (Wrong). But I would like to print SE01 is 28 (Total number of lines)

    Thanks


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 2.  RE: EDI 863 SE01 record

    Posted Tue April 06, 2004 06:52 PM

    SE01 is the total number of segments. SE01 is not the line count. You have repeating segments in your X12 document (NTE, PID, REF).

    If your segment delimiter is “line feed” and if you don’t have any repeating segments, total # of lines in your ST will be equal to SE02.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 3.  RE: EDI 863 SE01 record

    Posted Tue April 06, 2004 06:54 PM

    <errata>

    If your segment delimiter is “line feed” and if you don’t have any repeating segments, there is a chance that total # of lines in your ST will be equal to SE01.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 4.  RE: EDI 863 SE01 record

    Posted Tue April 06, 2004 07:36 PM

    Is there any way I can get total number of lines other than putting line count logic for every line written?


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 5.  RE: EDI 863 SE01 record

    Posted Tue April 06, 2004 08:30 PM

    You should be able to use the pub.string:tokenize service with line-feed as the delimiter.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 6.  RE: EDI 863 SE01 record

    Posted Tue April 06, 2004 08:34 PM

    Ramendu,

    Are you mapping the lineitems to LIN segment?


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: EDI 863 SE01 record

    Posted Tue April 06, 2004 08:42 PM

    In general EDI mapping lineitems mapping should go with one main segment like LIN,MEA etc nesting with otber child segments…
    If so then pub.list:sizeOfList(6.0 service)can be used to get lineitem count.

    HTH,


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 8.  RE: EDI 863 SE01 record

    Posted Tue April 06, 2004 11:28 PM

    Development platform is wm ver 6.0.1. I am passing \n to the parameter delim of tokenize function but it is not recognizing new line.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 9.  RE: EDI 863 SE01 record

    Posted Tue April 06, 2004 11:33 PM

    The trick is while setting the value to delim of tockenize service,
    open the setValue popup box using mouse rightclick then use Large Editor option and just enter the tab and close the window.

    This will take care of new line.

    HTH,


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 10.  RE: EDI 863 SE01 record

    Posted Wed April 07, 2004 02:02 PM

    you should just hit the enter button and close the popup box for handling newline character.Sorry,In my previous post i said enter the tab,

    HTH,


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 11.  RE: EDI 863 SE01 record

    Posted Fri April 09, 2004 03:44 PM

    If I understand you correctly, you want to calculate the correct SE01 value. Uday is right, SE01 is the number of ST Segments. The build-in function wm.b2b.edi:convertToString can calcuate SE01 value correctly and automatically if you map the SE01 field to empty string before feeding to wm.b2b.edi:convertToString. From that onward, you would use addGroupEnvelope and addICEvelope as the documentation said. By the way the example you have post is missing ISA and GS segment.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 12.  RE: EDI 863 SE01 record

    Posted Fri April 09, 2004 06:39 PM

    I tried both ways 1) by assigning empty string to SE01 before calling convertToString and 2) by tokenize and sizeOfList from string converted file. and both are working fine.

    Thanks everyone for your help!


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services