# multiple transaction sets

**URL:** <https://techcommunity.softwareag.com/t/multiple-transaction-sets/109108>\
**Category:** Forum\
**Tags:** EDI\
**Created:** [October 27, 2006, 2:04pm UTC](https://techcommunity.softwareag.com/t/multiple-transaction-sets/109108 "2006-10-27T14:04:26Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![wmKnight](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@wmKnight](https://techcommunity.softwareag.com/u/wmKnight)\
**Post date:** [October 27, 2006, 2:04pm UTC](https://techcommunity.softwareag.com/t/multiple-transaction-sets/109108/1 "2006-10-27T14:04:26Z")

</div>

hii all  
how can we handle multiple transaction sets in a document if  
we want to publish it by using services wm.b2b.edi.envelopeprocess and  
wm.b2b.edi.converttovalues.😕

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [October 27, 2006, 7:37pm UTC](https://techcommunity.softwareag.com/t/multiple-transaction-sets/109108/2 "2006-10-27T19:37:47Z")

</div>

Basically after the envelopeprocess step you have to loop on ISA/GS/ST and inside loop call getEDIString and then convertToValues(this will parse each ST trsactionset) to handle multiple trans sets…

HTH,  
RMG

---

<div class="post-metadata">

**Author:** ![wmKnight](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@wmKnight](https://techcommunity.softwareag.com/u/wmKnight)\
**Post date:** [November 1, 2006, 11:38am UTC](https://techcommunity.softwareag.com/t/multiple-transaction-sets/109108/3 "2006-11-01T11:38:07Z")

</div>

Hi !  
below is the sample EDI doc consisting of two ST segments i’m using … plz indicate how to differentiate between multiple ST segments …with delimiter. the problem is that the second ST segments appears inside the first SE segment after running envelopeProcess, getEDIstring, & convertToValues services… (plz see text in bold to mark beginning of new ST segment; the data is same in both the ST segments)  
plz suggest appropriate changes/delimiter(s)…

ISA_00_ _00_ _01_001325851 _01_050357789M _000110_1425_U_00400_000000035_0_P_\<_GS_QM_001325851_050357789M_20000110_1425_767_X_004010_  
ST_214_000000035  
B10_R6514545NA_00000064631M_SCAC  
N1_SF_Big Fred and Little Al ABC Company  
N2_AKA Van Artsdalen Mfg  
N3_800 Any Street  
N4_Any Town_MN_55060-0000  
LX_1  
AT7_AF_NS__200001101341_LT  
MS1_Any Town_MN  
MS2_SCAC_0067291_TF  
L11_14781-55060_SI  
L11_1_QN  
AT8_G_L_16880_640_8_E_960SPO_202831 REPL_1022_PC_1008_L_40320  
SE_14_000000035\*  
ST_214_000000035  
B10_R6514545NA_00000064631M_SCAC  
N1_SF_Big Fred and Little Al ABC Company  
N2_AKA Van Artsdalen Mfg  
N3_800 Any Street  
N4_Any Town_MN_55060-0000  
LX_1  
AT7_AF_NS__200001101341_LT  
MS1_Any Town_MN  
MS2_SCAC_0067291_TF  
L11_14781-55060_SI  
L11_1_QN  
AT8_G_L_16880_640_8_E_960SPO_202831 REPL_1022_PC_1008_L_40320  
SE_14_000000035  
GE_1_35  
IEA_1_000000035  
GE_1_35  
IEA_1_000000035

Thanks,  
Knight,  
A dev guy… !

---

<div class="post-metadata">

**Author:** ![Mary\_Tillman](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@Mary\_Tillman](https://techcommunity.softwareag.com/u/Mary_Tillman)\
**Post date:** [November 1, 2006, 11:00pm UTC](https://techcommunity.softwareag.com/t/multiple-transaction-sets/109108/4 "2006-11-01T23:00:33Z")

</div>

A dev guy,

ST02/SE02 elements represent transaction ID and should be different. I would expect to see

ISA_00_ _00_ _01_001325851 _01_050357789M _000110_1425_U_00400_000000035_0_P_\<_GS_QM_001325851_050357789M_20000110_1425_767_X_004010_  
ST_214_000000001  
B10_R6514545NA_00000064631M_SCAC  
N1_SF_Big Fred and Little Al ABC Company  
N2_AKA Van Artsdalen Mfg  
N3_800 Any Street  
N4_Any Town_MN_55060-0000  
LX_1  
AT7_AF_NS__200001101341_LT  
MS1_Any Town_MN  
MS2_SCAC_0067291_TF  
L11_14781-55060_SI  
L11_1_QN  
AT8_G_L_16880_640_8_E_960SPO_202831 REPL_1022_PC_1008_L_40320  
SE_14_000000001\*  
ST_214_000000002  
B10_R6514545NA_00000064631M_SCAC  
N1_SF_Big Fred and Little Al ABC Company  
N2_AKA Van Artsdalen Mfg  
N3_800 Any Street  
N4_Any Town_MN_55060-0000  
LX_1  
AT7_AF_NS__200001101341_LT  
MS1_Any Town_MN  
MS2_SCAC_0067291_TF  
L11_14781-55060_SI  
L11_1_QN  
AT8_G_L_16880_640_8_E_960SPO_202831 REPL_1022_PC_1008_L_40320  
SE_14_000000002  
GE_1_35  
IEA_1_000000035  
GE_1_35  
IEA_1_000000035

---

<div class="post-metadata">

**Author:** ![spg](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@spg](https://techcommunity.softwareag.com/u/spg)\
**Post date:** [November 2, 2006, 12:00am UTC](https://techcommunity.softwareag.com/t/multiple-transaction-sets/109108/5 "2006-11-02T00:00:04Z")

</div>

Knight,  
I think the reason you the second ST is getting inside the first one is, the SE segment of the first transaction set is ending with a field delimiter ‘\*’.

If you take that off, envelope process would give you the output you are looking for.

So, your first SE should look like “SE_14_000000035”

Shubhro

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [November 2, 2006, 12:22am UTC](https://techcommunity.softwareag.com/t/multiple-transaction-sets/109108/6 "2006-11-02T00:22:18Z")

</div>

Shubhro and Mary’s points address the specific problem you report. I would also add that the control numbers in your GS and (first) GE segments don’t match, the (first) GE01 should have a transaction count of 2, rather than one and you have extra GE and IEA trailers that are unnecessary/invalid.

Tim

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [November 2, 2006, 12:42am UTC](https://techcommunity.softwareag.com/t/multiple-transaction-sets/109108/7 "2006-11-02T00:42:16Z")

</div>

Knight,

I agree with Tim’s comments above,please fix your EDI document accordingly as shown below and this should work.Also your GS control number is not matching with GE and i have fixed that too.

ISA_00_ _00_ _01_001325851 _01_050357789M _000110_1425_U_00400_000000035_0_P_\<  
GS_QM_001325851_050357789M_20000110_1425_35_X_004010  
ST_214_000000001  
B10_R6514545NA_00000064631M_SCAC  
N1_SF_Big Fred and Little Al ABC Company  
N2_AKA Van Artsdalen Mfg  
N3_800 Any Street  
N4_Any Town_MN_55060-0000  
LX_1  
AT7_AF_NS__200001101341_LT  
MS1_Any Town_MN  
MS2_SCAC_0067291_TF  
L11_14781-55060_SI  
L11_1_QN  
AT8_G_L_16880_640_8_E_960SPO_202831 REPL_1022_PC_1008_L_40320  
SE_14_000000001  
ST_214_000000002  
B10_R6514545NA_00000064631M_SCAC  
N1_SF_Big Fred and Little Al ABC Company  
N2_AKA Van Artsdalen Mfg  
N3_800 Any Street  
N4_Any Town_MN_55060-0000  
LX_1  
AT7_AF_NS__200001101341_LT  
MS1_Any Town_MN  
MS2_SCAC_0067291_TF  
L11_14781-55060_SI  
L11_1_QN  
AT8_G_L_16880_640_8_E_960SPO_202831 REPL_1022_PC_1008_L_40320  
SE_14_000000002  
GE_2_35  
IEA_1_000000035

---

<div class="post-metadata">

**Author:** ![wmKnight](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@wmKnight](https://techcommunity.softwareag.com/u/wmKnight)\
**Post date:** [November 2, 2006, 12:42pm UTC](https://techcommunity.softwareag.com/t/multiple-transaction-sets/109108/8 "2006-11-02T12:42:31Z")

</div>

Dear rmg, Tim, shubhro, mary (tilmanm) 🆒 .  
I’ve modified the document according to ur suggestions… many thanks for pointing out the mistakes in the EDI doc… however :  
Shubhro… though i’ve removed ‘\*’ at the end of SE segment, it’s not resolving the issue… i.e. the second ST is still coming under SE of first transaction… ( screenshot attached …).  
could u plz suggest any other change ( apart from what’s done) to handle multiple ST segments, successfully…

Thnx,  
Knight,  
A Dev Guy… !🤣  
[modified\_EDI214sample.txt](https://techcommunity.softwareag.com/uploads/short-url/yUHLap5zZlvFT8VSImx0s1n848n.txt) (860 Bytes)

---

<div class="post-metadata">

**Author:** ![Brenda\_Dupont](https://avatars.discourse-cdn.com/v4/letter/b/8dc957/32.png) [@Brenda\_Dupont](https://techcommunity.softwareag.com/u/Brenda_Dupont)\
**Post date:** [November 2, 2006, 4:59pm UTC](https://techcommunity.softwareag.com/t/multiple-transaction-sets/109108/9 "2006-11-02T16:59:00Z")

</div>

Knight-  
I took a look at your modified EDI doc. You still have “_" at the end of the ISA & GS segment. Also my question to you is, what is your segment terminator? I see that your element terminator is "_” and sub-element terminator is “\<”. Are you using a carriage return as the segment terminator? I know at times that TN has issues when people send carriage return/line feed as the segment termintor as their segment terminator. Try this doc that I attached and see if it works. Also I noticed that your ISA.02, ISA.04,ISA.06, ISA.08 are not the set length they need to be. Not sure if you validate the ISA but that might cause you problems, but of course some people don’t validate the ISA but only the GS.  
[modified\_EDI214sample\_2.txt](https://techcommunity.softwareag.com/uploads/short-url/tJ43Q5xGpcytE3dCVgRgc0KHVxZ.txt) (855 Bytes)

---

<div class="post-metadata">

**Author:** ![Guest](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/guest/32/75_2.png) [@Guest](https://techcommunity.softwareag.com/u/Guest)\
**Post date:** [November 2, 2006, 7:00pm UTC](https://techcommunity.softwareag.com/t/multiple-transaction-sets/109108/10 "2006-11-02T19:00:27Z")

</div>

Knight,

I think we may be losing the forest for the trees here. If the goal is to get some sample EDI data to work with, and you can’t get it from the partner and there’s no EDI software available to do it consider writing a simple service in Developer to generate some. Install the 214 transaction in TN and create a flow service to put a 214 document in the pipeline, assign values to it, call convertToString followed by addGroupEnvelope and addICEnvelope and save it to a file. This should give you at least one valid EDI doc to work with and will save you the pain of trying to build it by hand in Notepad or whatever you’re currently using.

Tim

---

<div class="post-metadata">

**Author:** ![gupta\_r.17495](https://avatars.discourse-cdn.com/v4/letter/g/9fc348/32.png) [@gupta\_r.17495](https://techcommunity.softwareag.com/u/gupta_r.17495)\
**Post date:** [November 2, 2006, 7:21pm UTC](https://techcommunity.softwareag.com/t/multiple-transaction-sets/109108/11 "2006-11-02T19:21:18Z")

</div>

Knight,

The edi document which i have modified for you as above should also have segment terminator (ie record delimiter say carriage return or newline etc… ) once you fix it it will solve the ST/SE issue.Please try it the way users have been assisting you and let us know the result.Tim’s suggestion is the other way of creating the edi document with out asking your partner to send(else ask your partner to send valid sample 214 file)

HTH,  
RMG

---

<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:05pm UTC](https://techcommunity.softwareag.com/t/multiple-transaction-sets/109108/12 "2021-04-02T15:05:32Z")

</div>


