<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Integration Engineer &#187; Delimiters</title>
	<atom:link href="http://www.theintegrationengineer.com/category/edi/delimiters-edi/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theintegrationengineer.com</link>
	<description>When it just has to work.</description>
	<lastBuildDate>Fri, 03 Feb 2012 00:21:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Flat Files</title>
		<link>http://www.theintegrationengineer.com/flat-files/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flat-files</link>
		<comments>http://www.theintegrationengineer.com/flat-files/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 18:38:47 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[Delimiters]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[Mapping]]></category>
		<category><![CDATA[Character Delimited]]></category>
		<category><![CDATA[Comma Delimited]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[Data Export]]></category>
		<category><![CDATA[Data Import]]></category>
		<category><![CDATA[delimiter]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[ETL]]></category>
		<category><![CDATA[Fixed Position]]></category>
		<category><![CDATA[Fixed Width Files]]></category>
		<category><![CDATA[Space]]></category>
		<category><![CDATA[spreadsheet]]></category>
		<category><![CDATA[White Space]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=5</guid>
		<description><![CDATA[What is a flat file? Files are called &#8220;Flat Files&#8221; when they contain a single data structure.  Generally this structure is the column and row structure like a spreadsheet or table, but a file in binary or encrypted with a single encryption key could also be called a flat file.  Files that are not flat; [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-75" title="Flat File" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/01/flatfile.jpg" alt="flatfile Flat Files" width="160" height="120" /><strong>What is a flat file?</strong></p>
<p>Files are called &#8220;Flat Files&#8221; when they contain a single data structure.  Generally this structure is the column and row structure like a spreadsheet or table, but a file in binary or encrypted with a single encryption key could also be called a flat file.  Files that are not flat; marked up files like XML or HTML, <a href="http://www.theintegrationengineer.com/what-is-edi/">EDI </a>files, other formats like HL7 or SEF files and others.  Here I am going to briefly discuss two flat file types; Delimited Files, and Fixed Width Files.<span id="more-5"></span></p>
<p><strong>What is a Delimited File?</strong></p>
<p>Ok, to describe it briefly, a delimited file is a file where the data is organized in rows and columns.  Each row has a set of data, and each column has a type of data.  If it sounds like I am describing a spreadsheet, you are right on the money.  To make the column, each row has the columns separated with a character called a delimiter.  See the example below.</p>
<p><img class="aligncenter size-full wp-image-72" title="Illustration of Delimited Data" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/01/delimitedillustration.jpg" alt="delimitedillustration Flat Files" width="554" height="128" /></p>
<p>Tables of data and spreadsheets are both similar to a delimited file in the way they organize data.  In the delimited file all of the empty space, or white space is removed.  What we see here is a classic example of exporting a spreadsheet table as a comma delimited file.  In theory, this data can be imported by any other application that can read a delimited file.</p>
<p><em>Believe it of not, a space is a character, and takes up space in a file.  Back in the day people went out of their way to save space so that files could be send over slow modem connections.</em></p>
<p><strong>What is a Fixed Width File?</strong></p>
<p>There is another type of file, is is called a Fixed Width or Fixed Position file.  It is different from a delimited file in that the data fields are defined by the character position.  See the example below.</p>
<p><img class="aligncenter size-full wp-image-73" title="Fixed Width File Illustration" src="http://www.theintegrationengineer.com/wp-content/uploads/2009/01/wffileillustration.jpg" alt="wffileillustration Flat Files" width="570" height="132" /></p>
<p>In a fixed width file, the delimiter characters are eliminated.  If the data is formulated such that the data fields are the same size, this format can be more compact than a delimited file. You can see here that we know the size of the Birthdate data, so we eliminate all the spaces between the Bdate and Department fields.  If all of the data was formatted for size like this, we could really make this file small, so that it only contains the data.</p>
<p>We also eliminate the pesky problem of delimiters found in data.  The issue of a comma delimited file containing a field that has a comma in the data.  How does the parser know that this comma is not really a delimiter, but is part of the data?  Anyway, that problem is eliminated in a fixed width file.</p>
<p><strong>Comparison</strong></p>
<p>This is not a contest of which format is superior.  Both file architectures are useful and both are used commonly enough that you need to be at ease working with both.  Delimited files are really easy to work with as long as your data is clean of the delimiter character.  Doing quick integration of data common in ETL tasks, delimited files are far more common that Fixed Width.  Continuous operations of data integration and importation many times find that Fixed Width or Position files are more reliable for the unattended operation, even ETL if it is unattended.</p>
<p>As with many things in integration work, we want to pick the best option.  Knowing and working with both fixed and delimited files will help you determine which is the right choice for the task you have before you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/flat-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EDI Delimiters</title>
		<link>http://www.theintegrationengineer.com/edi-delimiters/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=edi-delimiters</link>
		<comments>http://www.theintegrationengineer.com/edi-delimiters/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 18:48:28 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[Delimiters]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[character]]></category>
		<category><![CDATA[Element Delimiter]]></category>
		<category><![CDATA[location]]></category>
		<category><![CDATA[Segment Delimiter]]></category>
		<category><![CDATA[Sub-Element Delimiter]]></category>
		<category><![CDATA[valid]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=24</guid>
		<description><![CDATA[What are Delimiters In short, delimiters are characters that separate the elements of data so that one piece of data can be distinguished from another.  EDI files don&#8217;t have externally set delimiters.  This means in a pure sense, that an EDI parser may not know what the delimiters will be until it has begun to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-26" title="Delimiter 2000" src="http://www.theintegrationengineer.com/wp-content/uploads/2008/08/raygun.jpg" alt="raygun EDI Delimiters" width="131" height="97" /><strong>What are Delimiters</strong></p>
<p>In short, delimiters are characters that separate the elements of data so that one piece of data can be distinguished from another.  EDI files don&#8217;t have externally set delimiters.  This means in a pure sense, that an EDI parser may not know what the delimiters will be until it has begun to parse the file.  This may sound chaotic for someone familiar with strict delimited files.  But we need to remember that in and EDI file, the first segment is fixed position.  This is how EDI addresses the problem.<span id="more-24"></span></p>
<p>In EDI there are three delimiters, each with a separate purpose and usage.  First, there is a segment delimiter.  This is the last character of every segment.  It is sometimes referred to as the segment terminator.  Next, there is the Element delimiter.  This character separates each data element from the neighbouring data elements.  This character will most likely be the most common character in any given EDI file.  The least commonly used character is the sub-element delimiter.  Some elements have sub elements defined within them.  In my experience these location asre used rarely.  You will probably find that this character only appears once in most of your EDI files, and that is in the ISA segment where it is defined.</p>
<p><strong>Where do you find the delimiters in the EDI file?</strong></p>
<p>Delimiters are essential in deciphering the contents of an EDI file and getting data out of it.  Because the parser needs to know the identity of these character before it can do meaningful parsing.  It must know where to find them.  In every EDI file the first segment is the ISA segment.  This segment is always 106 characters long, counting the first character &#8220;I&#8221; as 1.  This means that if our parser grabs the 106th character it shows the segment delimiter.  And the two characters that preceded it are the element and sub-element.</p>
<p style="padding-left: 30px;">Element Delimiter = Character 104</p>
<p style="padding-left: 30px;">Sub-Element Delimiter = Character 105</p>
<p style="padding-left: 30px;">Segment Delimiter = Character 106</p>
<p><strong>What good are delimiters?</strong></p>
<p>First lets say that this list of criteria will be incomplete as it is mostly based on my experiences.  Second, though I am gifted I doubt that I can imagine every possible way to create confusion.  Now here are the rules:<img class="alignleft size-full wp-image-25" title="ruler" src="http://www.theintegrationengineer.com/wp-content/uploads/2008/08/ruler.jpeg" alt=" EDI Delimiters" width="45" height="273" /></p>
<p>1.  Delimiters must be unique.  Even if you don&#8217;t use the sub-element, you still have to use a different character than used in the other delimiters.</p>
<p>2.  Delimiters must be single characters.  (we will talk about the exception on the Good Form section)</p>
<p>3.  Delimiters must be printable ASCII characters, excluding the alpha and numbered characters.  Also excluding the common punctuation.  (having the letter &#8220;B&#8221; as a delimiter would make a file unreadable.</p>
<p>4.  There are characters that are forbidden like the back tick.</p>
<p>5.  There are characters that are allowed like &#8220;*&#8221; but that are appear commonly in text fields and descriptions, so they should be avoided.</p>
<p>Included with my EDI Usage Specification are a set of recommended delimiters.  I set my transformer to use them as default, and encourage my trading partners to do the same.</p>
<p><strong>What&#8217;s the big deal?</strong></p>
<p>Delimiters are critical to having your integration function smoothly.  Selecting good delimiters and following good practices for using them help keep things from facing constant revision.  Being consistent helps your trading partners.</p>
<p>&#8211;</p>
<p>Looking for something else relating to EDI?  Check out the <a href="http://www.theintegrationengineer.com/the-edi-primer/">EDI Primer</a> post</p>
<p><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_b2b49725-0564-4e90-a2d5-2f349cb25499"  WIDTH="400px" HEIGHT="150px"> <PARAM NAME="movie" VALUE="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Ftheinteengi-20%2F8010%2Fb2b49725-0564-4e90-a2d5-2f349cb25499&#038;Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Ftheinteengi-20%2F8010%2Fb2b49725-0564-4e90-a2d5-2f349cb25499&#038;Operation=GetDisplayTemplate" id="Player_b2b49725-0564-4e90-a2d5-2f349cb25499" quality="high" bgcolor="#ffffff" name="Player_b2b49725-0564-4e90-a2d5-2f349cb25499" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="150px" width="400px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Ftheinteengi-20%2F8010%2Fb2b49725-0564-4e90-a2d5-2f349cb25499&#038;Operation=NoScript">Amazon.com Widgets</A></NOSCRIPT></p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/edi-delimiters/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>EDI in Good Form</title>
		<link>http://www.theintegrationengineer.com/edi-in-good-form/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=edi-in-good-form</link>
		<comments>http://www.theintegrationengineer.com/edi-in-good-form/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 22:02:06 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[Delimiters]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Segments]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[Good Form]]></category>
		<category><![CDATA[Repetition]]></category>
		<category><![CDATA[Space]]></category>
		<category><![CDATA[trailing delimiters]]></category>
		<category><![CDATA[Unwrapped]]></category>
		<category><![CDATA[White Space]]></category>
		<category><![CDATA[Wrapped]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=22</guid>
		<description><![CDATA[Beyond just compliance with the EDI standards, good form is using good practices in planing the format of your EDI.  Below are a set of rules or guidlines that will help you create EDI in good form.  Good form helps others to received your EDI and process it without encountering common exceptions.]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-23" title="venusmilo" src="http://www.theintegrationengineer.com/wp-content/uploads/2008/08/venusmilo-108x300.jpg" alt="venusmilo 108x300 EDI in Good Form" width="63" height="176" />Beyond just compliance with the EDI standards, good form is using good practices in planing the format of your EDI.  Below are a set of rules or guidelines that will help you create EDI in good form.  Good form helps others to received your EDI and process it without encountering common exceptions.</p>
<p><strong>Eliminate trailing delimiters.</strong></p>
<p>When EDI was first created, modems were much slower, and high speed internet and Wi-Fi didn&#8217;t exist.  Moving large, verbose files over a network took time, and e-commerce solutions charged by the kilo-character.  This means that having unneeded characters cost money.<span id="more-22"></span></p>
<p>EDI, in good form tries to eliminate extra characters.</p>
<p><span style="text-decoration: underline;"> The rule is to keep your segments as compact as possible by eliminating optional trailing data elements.</span></p>
<p><strong>Choosing Effective Delimiters</strong></p>
<p>It is illegal to have a <a href="http://www.theintegrationengineer.com/edi-delimiters/">delimiter</a> as part of the data in any data field.  There is no escape character that will allow it.  That being said, many systems will allow EDI that breaks this rule to be formed, as it does not harm the system sending the message.</p>
<p>However, it becomes impossible for the receiver to read the message properly.  (I know that some of you have encountered and scripted solutions for this type of thing, but this is about good form, not work-a-rounds for bad form.)  If you are lucky, this violation only errors out of translation.  If you are not so lucky, the translation succeeds and you have corrupt  data in your system.</p>
<p><span style="text-decoration: underline;">The rule is to select delimiters that will never appear in your output data.</span></p>
<p><strong>Avoid Unnecessary Repetition<br />
</strong></p>
<p>Some segments can be found in multiple locations in an EDI document.  This allows for a flexible and context sensitive usage of segments and data.</p>
<p>Lets take the N1 segment and group for example.  In a shipping notice you can use the N1 in the header section before any of the line items, but you can also use it in the line level.  This gives you power to specify specific shipping locations for the line.</p>
<p>This is great if each line is going to a different locations, but if most of the time this means that the N1 group repeats the same information over and over, then we are wasting space and are not in good form.  It would be best if we place as much information where it will only be displayed once if it is the same.  And in our shipping example, we can specify that N1 only appears in the line if and when there is an overriding shipping locations.  (this is where having effective usage specs comes in handy.)</p>
<p><span style="text-decoration: underline;">The rule is to avoid repetition of any data that can be represented in a non-repeating structure.</span></p>
<p><strong>Remove Excess White Space</strong></p>
<p>Just like any other character spaces take up room in the file.  Outside of the ISA segment, no EDI fields should contain leading or trailing white space.</p>
<p><span style="text-decoration: underline;">The rule is to trim or remove any whites space in an EDI field.</span></p>
<p><strong>Send EDI in Wrapped form</strong></p>
<p>When EDI is wrapped it looks like one continuous line of text characters.  When EDI is unwrapped each line appears on its own line.  Normally people do this by inserting carriage returns and line feeds after each segment delimiter.  Humans have an easier time reading an unwrapped EDI files.  So in most of the examples of EDI that I use here are unwrapped EDI.</p>
<p>Wrapped and unwrapped EDI are both EDI and most parsers don&#8217;t have a problem with either one.  But line feeds and carriage returns are characters and take up space.  And because in good form EDI eliminates excess characters, these should be eliminated as well.</p>
<p><span style="text-decoration: underline;">The rule is, always transmit wrapped EDI.</span></p>
<p><span style="color: #808080;"><em>Some people try to have the best of both worlds and try to use a line feed as a segment delimiters.  This is a bad idea.  First, delimiters are supposed to be a single character, second, different operation systems treat these characters differently.  And some systems pre process files and remove carriage returns and line feeds.  Basically, its not a nice way to do it and will eventually cause someone trouble</em>.</span></p>
<p><strong>What all these rules have in common?</strong></p>
<p>What all of these rules have in common is saving space.  Creating EDI that uses extra or unnecessary characters is bad form.</p>
<p>&#8211;</p>
<p>Looking for something else relating to EDI?  Check out the <a href="http://www.theintegrationengineer.com/the-edi-primer/">EDI Primer</a> post</p>
<p>&#8211;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/edi-in-good-form/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The EDI Primer</title>
		<link>http://www.theintegrationengineer.com/the-edi-primer/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-edi-primer</link>
		<comments>http://www.theintegrationengineer.com/the-edi-primer/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 19:32:20 +0000</pubDate>
		<dc:creator>Roy</dc:creator>
				<category><![CDATA[b2b]]></category>
		<category><![CDATA[Delimiters]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[EDI Primer]]></category>
		<category><![CDATA[Elements]]></category>
		<category><![CDATA[Envelope]]></category>
		<category><![CDATA[GS]]></category>
		<category><![CDATA[ISA]]></category>
		<category><![CDATA[Segments]]></category>
		<category><![CDATA[ST]]></category>
		<category><![CDATA[convention]]></category>
		<category><![CDATA[Element Notation]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[Enveloping]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[Good Form]]></category>
		<category><![CDATA[hierarchial]]></category>
		<category><![CDATA[loops]]></category>
		<category><![CDATA[notation]]></category>
		<category><![CDATA[Specification]]></category>
		<category><![CDATA[Unwrapped]]></category>
		<category><![CDATA[usage]]></category>
		<category><![CDATA[values]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[Wrapped]]></category>

		<guid isPermaLink="false">http://www.theintegrationengineer.com/?p=6</guid>
		<description><![CDATA[For those who may be unfamiliar with the EDI standard, and those who may have used EDI but have encountered a new, unfamiliar question. This introduction aims at addressing the basic questions of convention and implementation of the EDI technology.  I have a list of topics, and hope that over time I can cover all [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-18" title="pipes" src="http://www.theintegrationengineer.com/wp-content/uploads/2008/08/pipes.gif" alt="pipes The EDI Primer" width="76" height="95" />For those who may be unfamiliar with the EDI standard, and those who may have used EDI but have encountered a new, unfamiliar question.</p>
<p>This introduction aims at addressing the basic questions of convention and implementation of the EDI technology.  I have a list of topics, and hope that over time I can cover all of them.  I also hope that people reading here may have questions that I haven&#8217;t thought to write about.  Please let  me know what your questions are and I will see what I can do about providing answers.<span id="more-6"></span></p>
<ul>
<li><a href="http://www.theintegrationengineer.com/what-is-edi/">What is EDI?</a></li>
<li><a href="http://www.theintegrationengineer.com/the-parts-of-edi/">Parts of EDI</a></li>
<li><a href="http://www.theintegrationengineer.com/edi-segments/">Segments</a></li>
<li><a href="http://www.theintegrationengineer.com/edi-delimiters/">Delimiters</a></li>
<li>Conventions of EDI</li>
<li><a href="http://www.theintegrationengineer.com/why-are-there-more-than-one-version-of-edi/">Why are there more than one version of EDI?</a></li>
<li><a href="http://www.theintegrationengineer.com/usage-of-edi-specifications/">Standards and Usage</a></li>
<li>Encoded Values</li>
<li><a href="http://www.theintegrationengineer.com/edi-in-good-form/">EDI in Good Form</a></li>
<li><a href="http://www.theintegrationengineer.com/edi-elements/">Element Notation</a></li>
<li><a href=" http://www.theintegrationengineer.com/edi-wrapped-and-unwrapped/">Wrapped and Unwrapped EDI</a></li>
<li><a href="http://www.theintegrationengineer.com/edi-enveloping-part-one/">Enveloping Part One</a></li>
<li><a href="http://www.theintegrationengineer.com/edi-enveloping-part-two-the-isa/">Enveloping Part Two &#8211; ISA<br />
</a></li>
<li><a href="http://www.theintegrationengineer.com/edi-enveloping-part-three-the-gs">Enveloping Part Three &#8211; GS</a></li>
<li><a href="http://www.theintegrationengineer.com/edi-enveloping…rt-four-the-st/">Enveloping Part Four &#8211; ST</a></li>
<li><a href="http://www.theintegrationengineer.com/edi-repeated-segments/">Loops in EDI</a></li>
<li>Hierarchical Levels</li>
</ul>
<p>Of course understanding how EDI presents and represents data is the first step.  From here we may want to go to our Data Mapping Guide, or if we are familiar with mapping there are some examples in our mapping case studies of EDI to and from other formats.  Again, if you have an interesting problem or solution, I would love to here about it.  Please send it to<br />
<a href="mailto:roy@TheIntegrationEngineer.com">roy@TheIntegrationEngineer.com</a> and I will see what I can do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theintegrationengineer.com/the-edi-primer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching using disk: basic

Served from: www.theintegrationengineer.com @ 2012-02-05 11:13:29 -->
