Generating valid X12

I’m attempting to create outgoing EDI transactions. Part of our process involves generating the EDI string, and submitting it to TN, so that transactions can be traced from a single spot (TN)

Anyway, I translate the flatfile to a record structure, map it to the EDI record (4010 X12 856 in this case) then call convertToString, the add the envelopes. I submit the document to TN (having a problem getting that part working, so as a stop-gap I’m copying/pasting into the “test document submission” but that’s a problem for another day)

So, at this point, I’ve got ISA/GS/ST…/SE/GE/IEA in a string, and TN de-envelopes properly, so I see X12 Envelope, and X12 Group in TN. However, I don’t see the transaction sets, instead, I get a single Unknown document. I’ll post a small example here:

ISA00 00 01208334425 091307919650000 0306161439U4010 * 2191T*:
GSSH2083344251307919650000200306161439219T4010
ST856302
BSN003298858200305290000
DTM011200305310000
HL
1S1
TD5
O93451-1641MAERO CTSH
FOB
CCFOBACHAMLER , OH
N1
STHAMLER , OH
N4
HAMLER*OH
USA
N1SFLIMA, OHIOZZ66A
N4LIMAOHUSA
HL*2
O1
PRF
0VERBAL-00013298858
HL
3E1
TD3
HMD2.2ANHYDROUS AMMONIA
HL
4
D0
SN1**00019.490
TN00020.000*TNAC
PIDS08FP2.00ANHYDROUS AMMONIA
PKG
S36ZZBUL
CTT
000004
SE20302
GE1219
IEA1 219

Any idea what’s wrong with my 856?

Thanks in advance!

Hi,

You need to make sure the document type for 856 is loaded in TN.
To load the document type go to [url]http://localhost:5555/WmEDIforTN[/url] and load the respective document types.

SS

Thanks for the quick response.

I wish it were that simple… The document type has been loaded into TN already. The only other thing I should mention is that this particular customer wants to see \u0061 (“a”) as their segment delimiter, so where you see carriage returns, my actual document has just “a”

Try loading the document first with default segment delimeter such as * and test it. if its successfully recognizing then you need to figure out how to resolve segment delimeter.

Tried that too

TN parses out the Envelope and Group just fine (both with default and the customized delimiters) so it’s not a delimiter problem…

It’s somewhat frustrating because it’s basically impossible to tell where the recognition is going awry…

Try testing the below data and let me know.
ISA00 00 01123455789 01TEST01 0305281900U004010000004340P>
GSSH098533326051222065030528190092X004010
ST8561
BSN001408388200305280000
DTM01120030528
DTM01720030604
HL1**S1
REFWY61216116100
REFSCA0
N1SFCOMPANY91510-T
N1ST**92TAPE
HL21I1
LINBP100088102VP*TC6301-602
SN1
18EA
HL
32P1
SN1
PCM00440218PL
HL43Q1
SN1CCM0400051056CT
HL
53Q1
SN1
CCM0400051066CT
HL63Q1
SN1CCM0400051306CT
CTT
6
SE221
GE192
IEA1000000434

If you are using Ver 6.0 or later, then the TPA is used for determining to what level the EDI txns are persistend in TN.

TN creates a TPA called the Default TPA when you do the EDIfoTN installation. If you open the TPA, you will be see the “splitOption” field (persisting level) as “Group” in it. Hence, any EDI txn, you persist in TN, it will only get broken into Envelope and Group.

So, if you want to see your txn at the ST level, either you can change your default TPA and reload the package(seems like a bug as it needs to be reloaded) or create a partner specific TPA and change accordingly.

I hope it helps.

I am able to post the document you sent into my TN and see the transaction type 856 in TN. Are you able to see the transaction types for other EDI standards like 850 ie do you have problem with only 856.

Shouldn’t ISA12 be 00401 and GS08 be 004010? Just a shot in the dark but maybe de-enveloping is getting confused as to what version the transaction sets are, and thus the doc type names, if it is expecting 004010 instead of 4010.

I’ve had 850s and 855s get recognized without a hitch, just these 856’s are giving me trouble.

The transaction that you posted didn’t go through either - though I think it’s because of the formatting that the forum does to it. I’m going to try and re-install that document into TN, and try again.

Oh - and before I forget to mention it - I’m on 4.6

yes, you need to make sure the ISA header has correct spaces before posting, because the forum changed the formatting.

When I manually fixed the ISA that SS sent me (padding stuff to the correct length) then it recognized fine. I noticed the ISA difference, and made that quick change, but didn’t spot the GS difference.

Rob’s suggestion fixed the problem right up. Thanks again for all your help everyone!