![]() |
![]() |
|
|
|
|
|
|
|
|
|
|
|
||
|
Highlights
Supported File Formats
Supported Character Sets
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.
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 COBOL
Source to an ASCII Text File
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
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:
|
|
|
||
| © 2003 - 2006 Fujitsu Computer Systems Corporation. All Rights Reserved. |