none
Allow Leading spaces Party Biztalk 2009 RRS feed

  • Question

  • I have a party as sender and party as receiver both with "Allow Leading and Trailing Numbers and Spaces" checked. Party as sender has "Preserve Interchange – Suspend transaction sets on error" set.

    When I pass a 837 file through it fails on the send port. Note: I have seen some strange stuff here. The failure are leading spaces in the NTE segment. A note segment.

    So to test this I created a new project and I just pass the file through.

    In this way I made sure that I could switch different settings like different "Inbound batch processing options".

    When I switch to either of the:

    Split Interchange as Transaction Sets and click both Sender and Receiver Allow Leading and Trailing Numbers and Spaces

    It works.

    But I change to "Preserve Interchange" it fails.

    The only suggestions I think I read where:

    1. create a custom receive pipeline that strips out the leading zeros.

    2. change the schema type for that segment to I think they said string.

    3. complain till I am blue in the face

    I don't think I will be able to do number three. But needed some humor every now and then.

    I guess I am bothered by the fact that there are many times I want to simply process someone's file and ignore most validation. Validating spaces for this project. They don't care and I don't care. The only person that does is Biztalk in this one situation. The one I want. Sorry. I will stop.

    Like I said before there weirdness when an error happens.

    File adapter - it just does not error at first. It gives a warning.

    FTP adapter - it actually puts out a partial file - aborting in the log.

    For one of my 24 test cases you can get errors and produce a file with just ISA GS GE IEA. No ST to SE data. Scarry stuff.

    I guess I am asking is there any other options but 1 or 2 from above. Besides using "Split Interchange" I want "Preserve Interchange".

     

    Here is my spread sheet of research just for fun (I did NOT triple recheck my results so hopefully they are correct):

     

    Tests Split Interchange as Transaction Sets - Suspend Interchange on error Split Interchange as Transaction Sets  – Suspend transaction sets on error Preserve Interchange - Suspend Interchange on error  Preserve Interchange – Suspend transaction sets on error Party as Sender - Allow Leading and Trailing Numbers and Spaces Party as Receiver - Allow Leading and Trailing Numbers and Spaces Space/No Space No Error/Sender ID changed No file/ Error NTE Space in Segment No File/ Warrning File Adapter failed to transmitt No File/ Error in Receive Port No Error/Sender ID Not Changed Partial File Created ISA GS GE IEA no ST - SE and Sender ID not Changed
    1 , 7 x1 x7     x x NS x          
    2 , 8 x2 x8     x x S x          
    3 , 9 x3 x9     x   NS x          
    4 , 10 , 16 , 22 x4 x10 x16 x22 x   S   x x      
    5 , 11 x5 x11       x NS x          
    6 , 12 , 18 x6 x12 x18     x S   x   x    
    13 , 19     x13 x19 x x NS         x  
    14 , 20     x14 x20 x x S   x x      
    15 , 21     x15 x21 x   NS         x  
    17 , 23     x17 x23   x NS         x  
    24       x24   x S   x   x   x
      837 with or with-out a leading space in the NTE segment (note). All tests had Party as Receiver ISA Reciever ID changed to see the new ID (111111111).                  
      I grouped together tests that had the same results.                      
                               
      Some thoughts: I was expecting the Preserve Interchange options to be able to change the Sender ID's. It was hard to imagine if it was working till I changed the option to Split Interchange, which was like flipping a switch in most many cases. However, I also expected the same errors for each case.                   
      I was expected 14 and 20 to be no error like 2 and 8.  What also surprised me was the partial file on number 24…wow.                
      Also if you used a FTP adapter instead and the cases where you get a warning the ftp adapted starts to send a file but aborts. The receiving side gets a partial file…ouch!                  
                               
      What I really wanted was  test 14 and 20 to be like tests 2 and 3, not erroring out. Changing the sender id was optional…sad for me that it did not work out.                   

     


    vb.net programmer
    Tuesday, January 11, 2011 3:53 PM

Answers

  • Looks like after some more digging I found some answers.

    Carlos I did not see the flakyness in the schemas mapping.

    This was all on the assembling pipeline.

    I did find in the documentation where it states I will see a file with just ISA and GS GE IEA.

    So that one is by design.

    I ended up wanting Biztalk to do somthing it was not designed to do.

    When you have

    Preserve Interchange – Suspend transaction sets on error

    and I wanted assembler to ignore leading spaces, it cannot. It must know the schema it is using and that it is a full transaction with headers then skips over any ignoring of leading spaces.

    The only thing that

    Preserve Interchange – Suspend transaction sets on error

    is not seamingly documented is that ftp will send a partial file. It should not do that in my opinion.

    I am closing this as I have used a custom component in the dissasemble pipeline that stripps out the leading spaces from the NTE segment.

    Thanks,

    Chris


    vb.net programmer
    • Marked as answer by ckress-1234 Monday, January 17, 2011 9:40 PM
    Monday, January 17, 2011 9:40 PM

All replies

  • I am lost as to why it fails on the NTE. that is a free text area and I am not sure that trailing is handled as I would expect it. However, in regards to your question, I am a little lost about what you are trying to acheive. Can you clarify the problem and what you want. I tried to answer a few things based on what I got from your post.

    If you want to change the sender id, did you associate the send port with the trade partner? For triming, I am not sure that it will work on the NTE segment. I personally would insert the NTE segment into a table and do a rtrim(ltrim( on the select if you are pulling it for a report.


    Please Indicate "Mark as Answer" if this Post has Answered the Question
    Wednesday, January 12, 2011 1:00 PM
  • I have simplified my project, I stripped out all of the extras and made test cases to seek and find an answer.

    The real project did a bunch of things including passing the original file that came in from one internal system out the door to another internal system. Both systems are different parties in one organization.

    So, I do not create the 837 edi file. I pass it through. I think remapping the whole 837 is really a waste of using a mapper.

    Note: The NTE, it is not trailing spaces but leading spaces that is the problem.

    In my above I wanted to know if there was any way around my problem. But also to state that there is some weirdness in Biztalk, Microsoft code that is producing some fluky results.

    I did try number 2 above changing X12 A/N to String and that did not work. So it looks like receive pipeline component to preprocess and trim out the leading spaces is my only solution so far.


    vb.net programmer
    • Edited by ckress-1234 Wednesday, January 12, 2011 6:10 PM I ment leading spaces
    Wednesday, January 12, 2011 2:10 PM
  • With relation to the weirdness, make sure that yuo are using the latest schemas. One thing about biztalk is that schemas really can do a number on your maps and solution. I have implemented an 837 solution for P and I, and I have seen a few flaky things, but they went away once I got the correct schemas. If you are just passing values from an imput file to a table, what I have found is that using a DLL and xpath work very well. That is actually how I do it with my solutions. Basically have a DLL that will be called inside the orchestration and you pass the values using xpath. The DLL will then pass the values to a stored procedure and that is where you can do all the trimming to the extra spaces I was refering to. If you have any questions hwo to do that, let me know.
    Please Indicate "Mark as Answer" if this Post has Answered the Question
    • Proposed as answer by Carlos T. _ Monday, January 17, 2011 5:51 PM
    Wednesday, January 12, 2011 6:29 PM
  • Looks like after some more digging I found some answers.

    Carlos I did not see the flakyness in the schemas mapping.

    This was all on the assembling pipeline.

    I did find in the documentation where it states I will see a file with just ISA and GS GE IEA.

    So that one is by design.

    I ended up wanting Biztalk to do somthing it was not designed to do.

    When you have

    Preserve Interchange – Suspend transaction sets on error

    and I wanted assembler to ignore leading spaces, it cannot. It must know the schema it is using and that it is a full transaction with headers then skips over any ignoring of leading spaces.

    The only thing that

    Preserve Interchange – Suspend transaction sets on error

    is not seamingly documented is that ftp will send a partial file. It should not do that in my opinion.

    I am closing this as I have used a custom component in the dissasemble pipeline that stripps out the leading spaces from the NTE segment.

    Thanks,

    Chris


    vb.net programmer
    • Marked as answer by ckress-1234 Monday, January 17, 2011 9:40 PM
    Monday, January 17, 2011 9:40 PM