FUJITSU FS Logo
HomeMigrationsProductsServicesInformationNewsPartnersStudentPricingAbout Us
Quick Search  
DowloadSupport
Home > Products
Product title  
Windows Products
What COBOL for Me?
NetCOBOL for .NET
NeoKicks
NeoBatch®
NeoSort
NeoData
EZ Source™
NetCOBOL for Windows
PowerCOBOL
PowerBSORT
PowerFORM
Data Converter
Data Editor
Training Videos
Unix Products
NetCOBOL for Linux
NetCOBOL for SPARC Arch
Data Converter (SPARC Arch)
Data Editor (SPARC Arch)
NetCOBOL for HPUX
PowerBSORT

 

Data Converter for SPARC Architecture

Contents


Data Converter is a tool for converting data files from one format to another. You define the  file formats and Data Converter performs the task of moving the data between these file formats such as COBOL data files and CSV (comma separated values) format files. It can also convert between ASCII and EBCDIC character code systems or use any character conversion mapping you specify.

  Highlights

  • Move data between different COBOL file formats.
  • Load data files from text files.
  • Move COBOL data to and from spreadsheets and databases.
  • Convert data from one code set to another (e.g. ASCII to EBCDIC)

Supported File Formats

  • Sequential
  • Line Sequential (Text file)
  • Indexed
  • Relative
  • Binary
  • Comma-Separated Values (CSV, also known as an RDB Loader File)

Supported Character Sets

  • ASCII
  • EBCDIC
  • Other code conversions by editing the User Defined Conversion Tables

Supported Data Types

All COBOL data types such as packed decimal and binary data

Invocation Mode

Conversions are controlled using a command line providing the ability to work in batch mode.

Detailed Features and Benefits

The table below lists key features and benefits of Data Converter.

Feature Summary Detail of Feature Benefit of Feature
Text file conversions Converts text files containing either fixed- or variable-length records between EBCDIC and ASCII code systems and formats. Enables exchange of source and text files between EBCDIC and ASCII systems, or migration of code and text from EBCDIC systems to the Sun Solaris platform.
Data file conversions

COBOL products supported:

  • NetCOBOL for SPARC Architecture
  • Sun National COBOL

COBOL file organizations supported:

  • Record sequential
  • Line sequential
  • Relative
  • Indexed

Other file formats:

  • CSV suitable for passing data to/from databases
  • Output to text files

Character set conversions between:

  • EBCDIC
  • ASCII
  • User-defined conversion tables

Supported data types:

  • All COBOL-specific data types such as display numeric items with included signs and packed decimal.
  • Note that the converter is able to perform conversions between data types as well as changing field lengths.

Provides the ability to perform most of the conversions required in typical COBOL application use, such as:

  • Migrating data from one system to another
  • Sharing data between systems
  • Loading test files
  • Unloading data
Handling multiple record formats 

The Data Converter can handle files that contain multiple record formats. By defining a format selection control statement you can specify which record format to use for different record types.

This feature also lets you extract records of a particular format/type.

Important ability for supporting all existing files.

 

Overview of Using the Data Converter

The following examples let you see the features of Data Converter at work.

Converting EBCDIC COBOL Source to an ASCII Text File
Converting EBCDIC Text to an ASCII Text File
Converting a COBOL Indexed File to a CSV File

Converting EBCDIC COBOL Source to an ASCII Text File
This example illustrates how you would convert an 80-byte (fixed-length) EBCDIC text file (the format used for COBOL source) to an ASCII text file (used for source files in the Sun Solaris environment). The conversion is shown schematically in the following diagram.

To perform the conversion (on the Sun Solaris machine) you would enter the following command:

dataconvf -f SRC -itype cobolsrc -icode ebcdic -otype text

You can see that the Data Converter command line takes options in the form "-option-name" followed by a space and the option parameter.

Data Converter creates the output file name by appending ".out" to the input file name.

You don't need to specify the output code type (using the -ocode option) as it defaults to ASCII.

Converting EBCDIC Text to an ASCII Text File

This example is very similar to the last but illustrates that Data Converter can handle variable length EBCDIC text files that specify the length of each record in a Record Descriptor Word (RDW) in the first four bytes of each record.

The process is illustrated in the following diagram:

And is performed using the following command:

dataconvf -f TEXT -itype text -icode ebcdic -otype text

Converting a COBOL Indexed File to a CSV File
In this example we show how you would convert a COBOL indexed file to a CSV file, as illustrated in the following diagram:

The command line for this operation is:

dataconvf -f AMASTER -itype cblfile -icobfl idx,1,20 -otype rdb -csv1

Notice that the data definition file, "AMASTER.format" is not specified in the command line - Data Converter looks for AMASTER.format automatically. AMASTER.format is a typical COBOL record definition as shown below. Debugging lines (those marked with D in column 7) will not be used as part of the record definition.

When you specify an indexed file (-icobfl idx) you also specify the key offset and length - in this example we're assuming ITEM1 is the key in the above record.

Different types of CSV file can be created - one suitable for importing to Oracle (-csv1) and another suitable for importing to INFORMIX (-csv2) databases.

When you import the AMASTER.out CSV file into a databse the table definition would look like this:

CREATE TABLE S1.AMASTER
  (ITEM1 CHAR(30),
   ITEM2 INTEGER,
   ITEM3 INTEGER,
   ITEM4 CHAR(8),
   ITEM5 INTEGER)

Platforms Supported

  • Solaris™ 2.6 Operating Environment
  • Solaris™ 7 Operating Environment
  • Solaris™ 8 Operating Environment
  • Solaris™ 9 Operating Environment
  • Solaris™ 10 Operating Environment

 © 2003 - 2006 Fujitsu Computer Systems Corporation. All Rights Reserved.