Fujitsu Data Converter for SPARC Architecture
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)

