EDI Enveloping Part Three (The GS)

scratch head EDI Enveloping Part Three (The GS)What is the GS segment?

The GS segment is the second mandatory enveloping segment.  It shares some properties with the ISA segment.  There is a sender and receiver, version Identifier, time stamp and control number.  But one thing that the GS has that the ISA does not is a Functional Identifier.

That’s right, Functional.  This means that within the GS envelope are only EDI messages or documents that have the same function.

Here is a GS segment:

GS*PO*901234572000*908887732000*081031*0835*1*T*004010!

Like all segments, the first element is 0 and identifies the segment type.  This segment has a GS in this element, making it a GS segment.

Unlike the ISA segment, that does not change in any way from standard to standard, the GS may change a bit.

Here are the definitions of the GS segment for the 3020 X12 standard:

gs elementdef 3020 EDI Enveloping Part Three (The GS)

There are 8 elements.

And here is the definitions of the GS segment for the 4010 X12 standard:

gs elementdef 4010 EDI Enveloping Part Three (The GS)

Again there are 8 elements.

Now look at the size of the Date and Time elements in GS_04 and GS_05.  In the 3020 version, the Date is 6 char, and in 4010 it is 8 char.  The time also grows from a 6 to a possible 8 char size.

Version 4010 was considered the Y2K standard where the dates moved from a 6 char date, to and 8 char date to accommodate the century change.

Other than this change, the GS segments and usage are the same.

Element by Element

GS_01 is the Functional Identifier.  This designates the type of messages this envelope contains.  If it contains Purchase Orders, the GS_01 is “PO”  if it contains Invoices, it is “IN” as so forth.

GS_02 is the Sender Identifier.  This does not have to be the same as the ISA Sender, but it can be.  This element has the same restrictions on content, a 15 character alpha-numeric.  But unlike the ISA sender, this one is not fixed in size.  This means that the delimiters fit around the value without including any white space.  In many basic implementations, the value in the ISA sender, and the GS sender are the same value.

GS_03 is the Receiver Identifier.  This does not have to be the same as the ISA receiver, but it can be.  This element has the saem restrictions on content, a 15 character alpha-numeric.  But unlike the ISA sender, this one is not fixed in size.  This means that the delimiters fit around the values without including any white space.  In many basic implementations, the values in the ISA receiver and the GS receiver are the same value.

GS_04 is the Date.  It should be the date of the creation of the GS envelope.  Many times it is the same date as the ISA date.

GS_05 is the Time.  It should be the time of the creation of the GS envelope.  Many times it is the same as the ISA time.

GS_06 is the Control Number.  This is a 1 to 9 numeric value.  This is a number that needs to be unique inside the ISA envelope only.  Some implementations use an incrementing number that increments with the usage like the ISA control number.  Others just have a count of the number of GS envelopes inside an ISA.  Both are acceptable.  All that is required is that the GS control number be unique among other GS control numbers within the ISA envelope that it is contained in.

GS_07 is the Agency Code.  Basically for any X12 document that will be “T” or “X”.  I have only seen “X” indicating that it is really using X12.  Even when it is not.  Most of the time I ignore this value.

GS_08 is a Version identification value.  Just like the ISA_12, this identifies the standard, but identifies it to the next level.  Thus if you are 4010, this will be 004010 and so on.

Too Much?

No problem, there are really a few things to pay attention to as you begin to work with GS envelopes.  And if you are just needing to do a quick edit and resubmit you may not need to do much.

  • Pay attention to the GS_02 and GS_03, these are the sender and receiver and need to be conrect to route documents and match with the profile for most systems.
  • Make sure the GS_01 is the type of document that you are really sending.  Some systems get cranky when they get an Invoice in a Purchase Order envelope.
  • And as always, make sure your GS and GE control numbers match and are unique inside the ISA-IEA envelope.

For an overview of Enveloping go here.

Looking for the ISA enveloping page?

Looking for the ST enveloping page?

Looking for something else relating to EDI?  Check out the EDI Primer post

Subscribe to "The Integration Engineer" by Email
Find out about the tools and services available at The Integration Engineer's Consulting site.

Related Articles:

8 Responses to “EDI Enveloping Part Three (The GS)”

  1. ST EDI Enveloping | The Integration Engineer Says:

    [...] Looking for the  GS enveloping page? [...]

  2. How to hold Accountability of EDI Transactions with a Trading Partner | The Integration Engineer Says:

    [...] versed in the EDI enveloping levels you have already realized the  link of between the 997 and the GS level of the EDI envelope.  Also you may remember that you can request a 997 be returned for your transaction in the ISA [...]

  3. Sherdy Balingit Says:

    Many people don’t understand what GS segment really means and how it works. Good thing they explained all the important information in this post.

  4. venkataraman Says:

    I cannot understand the following line in GS02 and GS03. If possible can u explain it
    “This element has the same restrictions on content, a 15 character alpha-numeric. But unlike the ISA sender, this one is not fixed in size.——>” This means that the delimiters fit around the value without including any white space”<——-"

  5. Roy Says:

    The GS02 and GS03 elements are functional sender and receiver Identifiers. So they function the same way the ISA06 and ISA08 values.

    Unlike the ISA segment and elements, the GS does not have the fixed field size. Check out the ISA enveloping page to get a full explanation of this. So this mean that there should not be any white space around the Identifier value.

    The GS is the functional group, so it also does not need to be the same values found in the ISA segment. These can be functional values comparatively, in the ISA, we can say the document is from Vendor to Retailer, and the GS or functional can indicate it is from Account Receivable to Accounts Payable.

    Take a look at the ISA and GS enveloping pages and examine the way the sample segments look. If this doesn’t help with the explanation, then let me know and I will try to be more clear.

    Hope this helps.

  6. venkataraman Says:

    Thanks for the reply sir. Sorry for the late reply from my side.
    I understood that “in ISA06 if the sender id is not 15 characters we should represent the remaining fields with a blank space since the length is fixed as 15 characters, whereas in GS02 the length of the characters is not fixed and hence there is no need for the white space as we did in ISA06″

  7. Roy Says:

    Right. The value of the ISA Identifiers for does not include the white space that may be left in the fixed width fields. At least I have never included it, and all of the EDI software that I have used didn’t need me to enter the spaces to reach the 15 character size.

    In this way, the value of the GS and ISA identifiers can be the same value and there is no conflict based on the field size.

    It sounds like we are both on the same page. Let me know if there is still a question about any of these values. And thanks for your comments, quick or late it is nice to know people are getting value from the blog.

    Roy

  8. venkataraman Says:

    So from your above comment do you mean that even in ISA it is not in practice to include the white spaces if the length is less than 15 characters.

    I have gone through the entire EDI primer. Actually I am new to this EDI and your blog was very useful to understand the basics.

Leave a Reply

  • Sign up for our FREE Newsletter

  • Catagories


  • Affiliate Ads

Powered by WP Robot