# Generating valid X12

**URL:** <https://techcommunity.softwareag.com/t/generating-valid-x12/107815>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [June 17, 2003, 12:45am UTC](https://techcommunity.softwareag.com/t/generating-valid-x12/107815 "2003-06-17T00:45:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg.mitchell.23005](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@greg.mitchell.23005](https://techcommunity.softwareag.com/u/greg.mitchell.23005)\
**Post date:** [June 17, 2003, 12:45am UTC](https://techcommunity.softwareag.com/t/generating-valid-x12/107815/1 "2003-06-17T00:45:27Z")

</div>

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:

ISA_00 __00__ 01_208334425 _09_1307919650000 _030616_1439_U_4010 \* 219_1_T\*:  
GS_SH_208334425_1307919650000_20030616_1439_219_T_4010  
ST_856_302  
BSN_00_3298858_20030529_0000  
DTM_011_20030531_0000  
HL_1**S_1  
TD5_O_93_451-1641_M_AERO CT_SH  
FOB_CC_FOB_AC_HAMLER , OH  
N1_ST_HAMLER , OH  
N4_HAMLER\*OH**USA  
N1_SF_LIMA, OHIO_ZZ_66A  
N4_LIMA_OH**USA  
HL\*2**O_1  
PRF_0VERBAL-0001_3298858  
HL_3**E_1  
TD3_HM_D_2.2_ANHYDROUS AMMONIA  
HL_4**D_0  
SN1\*\*00019.490_TN **00020.000\*TN** AC  
PID_S_08_FP_2.00_ANHYDROUS AMMONIA  
PKG_S_36_ZZ_BUL  
CTT_000004  
SE_20_302  
GE_1_219  
IEA_1_ 219

Any idea what’s wrong with my 856?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![sridhsa](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@sridhsa](https://techcommunity.softwareag.com/u/sridhsa)\
**Post date:** [June 17, 2003, 12:53am UTC](https://techcommunity.softwareag.com/t/generating-valid-x12/107815/2 "2003-06-17T00:53:20Z")

</div>

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]](http://localhost:5555/WmEDIforTN%5B/url%5D) and load the respective document types.

SS

---

<div class="post-metadata">

**Author:** ![greg.mitchell.23005](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@greg.mitchell.23005](https://techcommunity.softwareag.com/u/greg.mitchell.23005)\
**Post date:** [June 17, 2003, 1:04am UTC](https://techcommunity.softwareag.com/t/generating-valid-x12/107815/3 "2003-06-17T01:04:56Z")

</div>

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”

---

<div class="post-metadata">

**Author:** ![sridhsa](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@sridhsa](https://techcommunity.softwareag.com/u/sridhsa)\
**Post date:** [June 17, 2003, 1:31am UTC](https://techcommunity.softwareag.com/t/generating-valid-x12/107815/4 "2003-06-17T01:31:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![greg.mitchell.23005](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@greg.mitchell.23005](https://techcommunity.softwareag.com/u/greg.mitchell.23005)\
**Post date:** [June 17, 2003, 1:39am UTC](https://techcommunity.softwareag.com/t/generating-valid-x12/107815/5 "2003-06-17T01:39:46Z")

</div>

Tried that too ![](http://www.wmusers.com/wmusers/clipart/sad.gif)

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…

---

<div class="post-metadata">

**Author:** ![sridhsa](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@sridhsa](https://techcommunity.softwareag.com/u/sridhsa)\
**Post date:** [June 17, 2003, 2:11am UTC](https://techcommunity.softwareag.com/t/generating-valid-x12/107815/6 "2003-06-17T02:11:20Z")

</div>

Try testing the below data and let me know.  
ISA_00 __00__ 01_123455789 _01_TEST01 _030528_1900_U_00401_000000434_0_P_\>  
GS_SH_098533326_051222065_030528_1900_92_X_004010  
ST_856_1  
BSN_00_1408388_20030528_0000  
DTM_011_20030528  
DTM_017_20030604  
HL_1\*\*S_1  
REF_WY_61216116100  
REF_SCA_0  
N1_SF_COMPANY_91_510-T  
N1_ST\*\*92_TAPE  
HL_2_1_I_1  
LIN**BP_100088102_VP\*TC6301-602  
SN1**18_EA  
HL_3_2_P_1  
SN1_PCM004402_18_PL  
HL_4_3_Q_1  
SN1_CCM040005105_6_CT  
HL_5_3_Q_1  
SN1_CCM040005106_6_CT  
HL_6_3_Q_1  
SN1_CCM040005130_6_CT  
CTT_6  
SE_22_1  
GE_1_92  
IEA_1_000000434

---

<div class="post-metadata">

**Author:** ![mrajanet](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@mrajanet](https://techcommunity.softwareag.com/u/mrajanet)\
**Post date:** [June 17, 2003, 2:14am UTC](https://techcommunity.softwareag.com/t/generating-valid-x12/107815/7 "2003-06-17T02:14:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sridhsa](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@sridhsa](https://techcommunity.softwareag.com/u/sridhsa)\
**Post date:** [June 17, 2003, 2:17am UTC](https://techcommunity.softwareag.com/t/generating-valid-x12/107815/8 "2003-06-17T02:17:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![reamon](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@reamon](https://techcommunity.softwareag.com/u/reamon)\
**Post date:** [June 17, 2003, 2:40am UTC](https://techcommunity.softwareag.com/t/generating-valid-x12/107815/9 "2003-06-17T02:40:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![greg.mitchell.23005](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@greg.mitchell.23005](https://techcommunity.softwareag.com/u/greg.mitchell.23005)\
**Post date:** [June 17, 2003, 2:54am UTC](https://techcommunity.softwareag.com/t/generating-valid-x12/107815/10 "2003-06-17T02:54:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sridhsa](https://avatars.discourse-cdn.com/v4/letter/s/74df32/32.png) [@sridhsa](https://techcommunity.softwareag.com/u/sridhsa)\
**Post date:** [June 17, 2003, 2:59am UTC](https://techcommunity.softwareag.com/t/generating-valid-x12/107815/11 "2003-06-17T02:59:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![greg.mitchell.23005](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@greg.mitchell.23005](https://techcommunity.softwareag.com/u/greg.mitchell.23005)\
**Post date:** [June 17, 2003, 3:03am UTC](https://techcommunity.softwareag.com/t/generating-valid-x12/107815/12 "2003-06-17T03:03:06Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:04pm UTC](https://techcommunity.softwareag.com/t/generating-valid-x12/107815/13 "2021-04-02T15:04:55Z")

</div>


