Data Conversion Solutions
Data conversion means moving information from one encoding, record layout or file format to another without losing meaning. For an overview of every DataMystic solution area, see the solutions index.
Code Page and Unicode Conversions
Buy Download TourTextPipe Pro is the ideal means to convert text encodings from between 145 language encodings and Unicode, or between 151 code page encodings and Unicode.
TextPipe can convert Mainframe EBCDIC files to ASCII format; you can even paste in your Mainframe copybook and TextPipe will do most of the work for you!
You can also:
- Convert between Unix, PC, Mac and Mainframe end of line and fixed width record formats. Conversion can detect incoming line feeds, and insert new characters such as line feeds between fixed-length records. Invalid End of Line characters can be automatically removed
- Convert unprintable IBM drawing characters to + and | and -
- Convert tabs to spaces or spaces to tabs
- Convert character case to UPPERCASE, lowercase, tOGGLE cASE, Title Case, Sentence case, rANdoM cASE
- Convert character collating sequence from ASCII to EBCDIC or EBCDIC to ASCII. Expand EBCDIC packed or zoned decimal, compress to EBCDIC packed or zoned decimal. Useful for handling mainframe files
- Convert ASCII (Windows OEM) to ANSI and ANSI to ASCII. Useful with Windows and non-English languages
- Convert CSV to Tab-delimited, CSV to XML
- Convert Tab-delimited to CSV, Tab-delimited to XML
- Convert text to a word list
- Convert text to a Hex or Decimal dump (very useful for finding control characters)
- Convert Word documents to text
Why Data Conversion Goes Wrong
Most conversion failures come from the same four sources. Knowing which one you have is half the fix.
- EBCDIC and ASCII. Mainframes store text in EBCDIC, where letters and digits sit at different byte values than in ASCII. A straight file copy produces unreadable characters. Numeric fields are harder still: packed decimal (COMP-3) and zoned decimal store digits and signs in nibbles, so a naive character translation corrupts them. Fields must be converted according to their type, which is what a COBOL copybook describes.
- Delimited files. CSV and tab-delimited files look simple until a field contains a comma, a quote or an embedded line break. Different systems escape these differently, and a single stray quote can shift every column after it.
- Code pages. Text saved under Windows-1252, an OEM DOS page, Shift-JIS or ISO-8859 will show wrong characters if read under another page. Accented names and currency symbols are the usual casualties. Converting to Unicode (UTF-8 or UTF-16) once, at the boundary, avoids repeated damage.
- Legacy record formats. Fixed-width records often have no line endings at all, or use Unix, PC, Mac or mainframe end-of-line conventions inconsistently. Record length, padding and trailing spaces all matter to the loading system.
How DataMystic Solves It
TextPipe applies a chain of filters to files of any size, so each problem above is handled by a named, repeatable step instead of a one-off script. You can build the chain visually, test it on a sample, then run it on thousands of files or from the command line on a schedule. Because the same filter chain runs every time, results are consistent from one batch to the next. For Microsoft Word sources, WordPipe automates replacements across Word documents before or after migration, so document content matches the data it describes.
Example: Converting a Mainframe Customer Extract
A retailer receives a nightly customer extract from an IBM mainframe. The file is EBCDIC, has fixed 240-byte records with no line endings, and holds balances as packed decimal. The target is a SQL database that expects UTF-8 CSV.
- Import the COBOL copybook so TextPipe knows each field’s offset, length and type.
- Insert an end-of-line after every 240 bytes to split the stream into records.
- Expand packed decimal balances into readable numbers and convert the remaining text fields from EBCDIC to ASCII.
- Trim trailing spaces from each field and convert accented characters to Unicode.
- Write the output as comma-separated values, quoting any field that contains a comma.
The result is a CSV file the database can load directly. The same chain is saved and run unattended each night. See the EBCDIC to ASCII guide and the mainframe conversion overview for field-level detail.
Related Reading
- Supported code pages and Unicode conversions
- Banking and finance case study, with legacy data handled at scale
- Government case study