none
Issue in processing .DAT file with BizTalk server 2009 RRS feed

  • Question

  • Hi all ,

    I am trying to process x12 file which with .dat extension instead of .txt. with default EDI Global settings and getting an error "No valid Segment terminator found".

     

    Any one has an idea how to process .dat and .txt file with CRLF and LF as line terminator.

     

    Thanks

    Saturday, January 15, 2011 12:22 AM

Answers

  • Thanks for your time CARLOS and AMIT.

    You both are right, I figured out the issue in code where we are checking for segment terminator and found that we are checking for '/r' (in case of CRLF this will be the 105(end of ISA) char before GS segment and incase of LF this will be '\n')and not for '/n'.

    we are only checking for '\r' and not for '\n'. I am assuming this will resolve my issue.

     

    I hope, this explanation helps you the understand the solution better.

     

    Thanks again, hope to catch you guys again.

    Wednesday, January 19, 2011 8:16 PM

All replies

  • Hi Truptesh,

    Firstly file extensions does not matter when processing files in BizTalk. You can pick up a EDI file in a Receive Location using the default Receive Pipeline, with any file extension.

    Now to process a X12 file with EDI Global settings you need to make sure you have the following.

    1. EDI is configured

    2. Receive Location is using the EDI Receive Pipeline

    3. The correct schema for the X12 transaction is deployed

    4. The X12 file is indeed a valid EDI File and does not have invalid characters at the end as CRLF or LF as the terminator does not give the above error if the file is valid.

     

    You can use EDI Validation Tools like EDI Notepad to open the file and confirm its valid before processing it systematically in BizTalk.

    Let me know how it goes.

     

    -amit

     


    amit kumar
    • Proposed as answer by technoamit Monday, January 17, 2011 10:23 PM
    Monday, January 17, 2011 4:09 PM
  • Hi Trup;

    Amit is right. The extension does not matter at all. In fact, you use extensions for filters and naming conventions, but as Amit said, nothing to do with EDI. The EDI notepad that Amir is talking about can be found in the link below. 


    Please Indicate "Mark as Answer" if this Post has Answered the Question
    • Edited by Carlos T. _ Monday, January 24, 2011 4:22 PM
    Monday, January 17, 2011 5:50 PM
  • Thanks for reply..

    I agreed but I am looking for any kind of settings which needs to be done on BizTalk server administration console to process the .dat and .txt file with out any issue.

    The exact path for the settings is BizTalk Server 2009 Administration > BizTalk Group > Parties >(right click) EDI Global Properties

    Any idea about this?

     

     

    Tuesday, January 18, 2011 4:44 PM
  • You really do not need parties to process a file. Personally I rather start procesing a file without the party to make sure it works first. If it does then jump into the party and make that work.

    Are you able to process any of the files? Can you process a file just as amit sugested?


    Please Indicate "Mark as Answer" if this Post has Answered the Question
    Tuesday, January 18, 2011 6:08 PM
  • Currently I am able to process valid X12 (.txt ) files without any issue  but when I am dropping an .DAT file I am getting above mention error in Event Viewer.
    Tuesday, January 18, 2011 8:39 PM
  • I am not sure if I am following all the way. If you drop one file with a .txt extension it works, but if you change the extension to the same file name to .dat it fails?
    Please Indicate "Mark as Answer" if this Post has Answered the Question
    Tuesday, January 18, 2011 8:50 PM
  • Currently I am working on this issue and in my research I found that the .txt file is having CRLF as line terminator and SEPERATORS in BizTalk Server 2009 Administration > BizTalk Group > Parties >(right click) EDI Global Properties > ISA Segment Definition are

    Segment Terminator : 0d - Hex

    Suffix : LF

    Where as .DAT file has LF line terminator and BizTalk is not processing this type of file. Even .txt file with LF as line terminator is also not working.

     

    Please let me know if any one has any idea.

     

    Tuesday, January 18, 2011 9:15 PM
  • Are you able to post a sample of each of the files. Something just does not sound right.
    Please Indicate "Mark as Answer" if this Post has Answered the Question
    Tuesday, January 18, 2011 9:20 PM
  • Here is the sample fil, the only difference between txt and dat file is dat file has LF as line terminator where as txt file has CRLF as line terminator.

    ISA*00*          *00*          *ZZ*TrupteshPatel  *30*990263440      *101227*0000*U*00401*000000001*0*P*:
    GS*BE*TrupteshPatel*990263440*20101227*0000*000001*X*004010X095A1
    ST*834*1001
    BGN*00*1001*20101227*0000****2
    DTP*007*D8*20101227
    N1*P5**ZZ*23140001
    N1*IN*UNIVERSITY HEALTH ALLIANCE*FI*990263440
    INS*Y*18*001*28*A***FT*N
    REF*0F*399199352
    REF*1L*23140001
    REF*ZZ*808955389-01
    NM1*IL*1*JENSON*LILIBETH*L***34*399199352
    PER*IP**HP*8083984565
    N3*1448 THURSTON AVENUE #16
    N4*HONOLULU*HI*96822
    DMG*D8*19730909*F
    NM1*31*1
    N3*1448 THURSTON AVENUE #16
    N4*HONOLULU*HI*96822
    SE*18*1001
    GE*1*000001
    IEA*1*000000001

    Tuesday, January 18, 2011 10:18 PM
  • Ok, since in the test file you have above, the only difference is the terminator and you have not set up a party, it must be going to the global party. In there, you should have the segment terminator to the default ~ and the sufix to none. Can you confirm? Also, if you change the .DAT test file to have CRLF, does it correct the problem for that file?
    Please Indicate "Mark as Answer" if this Post has Answered the Question
    Wednesday, January 19, 2011 2:21 PM
  • Hi Truptesh,

    After you do what Carlos suggested by manually replacing "LF" with "CR-LF" in your file the file should work if your previous file worked.

    The file is valid EDI  as far I checked. Try to open the file in Notepad and select all (Cntrl + "A") and copy paste into a new NotePAd and use Save as option with Type ANSI selected. Then reprocess the file. Again the extension does not matter as long as your Receice Location is setup correctly.

     

    If the file works then compare the 2 files. Any suffix after the segment Terminator is not a problem when using Global properties. I just tested that scenario.

     

    -amit


    amit kumar Please Indicate "Mark as Answer" if this Post has Answered the Question
    Wednesday, January 19, 2011 3:51 PM
  • Thanks for your time CARLOS and AMIT.

    You both are right, I figured out the issue in code where we are checking for segment terminator and found that we are checking for '/r' (in case of CRLF this will be the 105(end of ISA) char before GS segment and incase of LF this will be '\n')and not for '/n'.

    we are only checking for '\r' and not for '\n'. I am assuming this will resolve my issue.

     

    I hope, this explanation helps you the understand the solution better.

     

    Thanks again, hope to catch you guys again.

    Wednesday, January 19, 2011 8:16 PM