Skip to main content

Systems Integration: Moving Data Between Systems

Every organization eventually has to make two systems that were never designed to talk to each other exchange data. An accounting package has to feed a data warehouse, a mainframe has to hand records to a web application, or an acquired company's database has to be merged into the parent's. Middleware and APIs solve part of this, but a great deal of real-world integration still happens through files: exports, extracts, batch feeds and reports. TextPipe Pro is built for that file-based layer. It is one of the DataMystic solution areas.

Buy Download Tour

Why integration projects stall

The two ends of an integration rarely agree on format. One system writes fixed-width records in EBCDIC with packed decimal fields, the other expects UTF-8 CSV with quoted strings. Date formats differ, code tables differ, and one side pads every field with spaces while the other treats trailing spaces as data. Each mismatch is small, but together they produce rejected loads, silently truncated fields and long debugging sessions.

The usual answer is a custom script or a small program written for one feed. That works until the source layout changes, the author leaves, or the file grows beyond what the script can hold in memory. Integration teams also need to prove what changed between source and target, which is hard when the transformation lives in undocumented code.

How TextPipe fits into an integration

You can generate XML, CSV, Tab and SQL INSERT script exports of data in any system you can connect to via ODBC or OLE DB. Once you have the text extract, TextPipe can apply a series of search/replace operations, column re-arrangements or any other change to the data, then write the result in the layout the target system expects.

  • No size limits. TextPipe has no limit on the number of files it processes, the file size, or the length of lines. It makes no assumptions about the data you give it, and can even be used on binary files.
  • Many changes in one pass. Hundreds of search/replaces, column moves and format changes run in a single pass over the data, so a nightly feed stays within its batch window.
  • Targeted changes. Restrictions limit an operation to the first 100 rows, to CSV field 3, or to rows matching a pattern, and you can combine them.
  • Mainframe formats. Convert between EBCDIC and ASCII and handle COBOL record layouts without writing a parser.
  • Documented, repeatable filters. A saved filter list is a readable record of every transformation, which can be reviewed, versioned and re-run from the command line or a scheduler.

Example: feeding a mainframe extract into SQL Server

Consider a distributor whose order system runs on a mainframe. Each night it produces a 600 MB fixed-width EBCDIC file, and a SQL Server reporting database must load it before 6 a.m. The loading tool rejects the file because the amounts are in zoned decimal, the dates are written as YYYYDDD, and some customer names contain delimiter characters. A TextPipe filter list can fix this in one pass:

  1. Converts the file from EBCDIC to ASCII or Unicode.
  2. Splits each fixed-width record into fields and re-orders the columns to match the target table.
  3. Rewrites the Julian dates as ISO dates and strips the padding from every text field.
  4. Quotes or escapes any field containing the delimiter, and writes the result as CSV, or as SQL INSERT statements if the load tool needs them.

The filter list is saved and run each night from a scheduled command line job. When the mainframe team adds a field, the integrator changes one filter instead of rewriting a program.

Restrictions

Using TextPipe's unique Restrictions, you can control precisely which piece of text gets affected by a change, such as an UPPERCASE filter or a search/replace filter. Restrictions can be as simple as a line range or column range, a CSV field or other delimited field, or an XML element, attribute, or any combination of these.

Receive our white paper - TextPipe Restrictions - What are they and how do I use them?
How to use TextPipe Restrictions, line and column restrictions, combining restrictions, CSV and Tab-field restrictions, filename restrictions, HTML and XML restrictions, splitting lines between filesblackpixel


More white papers

easypatterns EasyPattern Pattern Language

Buy Download Tour

In addition to offering a standard Perl regex pattern matcher, TextPipe also provides the EasyPattern language - an English-like text pattern matching language that us mere mortals can understand without brain surgery!

e.g. to match phone numbers, use [3 digits, punctuation, 3 digits, punctuation, 4 digits].

Related reading

For integration work in practice, see the telecommunications case study, the consulting case study and the banking and finance case study. The SSIS data feed guide covers pairing TextPipe with SQL Server Integration Services. If your integration also touches Word documents, migrating Word documents with automated replacements shows the same batch approach. Related solution areas are data conversion and data mining.