![]() |
![]() |
|
|
eLink Information Integrator COBOL Copybook Importer
This section provides an overview of eLink Information Integrator COBOL Copybook Importer (hereafter referred to as eLink II CCBI). The following topics are discussed:
BEA eLink II CCBI Overview
The eLink II CCBI is a command-line utility that you can use to parse COBOL copybook files to Extensible Markup Language (XML) files. Used in conjunction with the BEA eLink Information Integrator, eLink II CCBI enables you to perform data translation and integrate the result into your eLink application development project.
The process includes two steps. The first step is to convert the COBOL copybook into a Message Formatting Language (MFL) document. (This is a type of XML document.) The second step is to load the XML document into the eLink Information Integrator database.
The following definitions give you a basic understanding of the components with which you will be working:
Using eLink II CCBI
The following steps demonstrate how to use eLink II CCBI. The Java runtime environment must be available and you must know the location of the installed Information Integrator files.
set path = jdk1.2.2\bin:%path%
ccbparse cobol2 star
Importing the Converted File
The following steps import a converted MFL file into the eLink Information Integrator database. The eLink Information Integrator must be running and the imported file must be available in the local directory structure. It may be necessary to transfer the imported file from the directory where it was created in the previous procedure. Refer to the BEA eLink Information Integrator User Guide and the BEA eLink Information Integrator Installation and Administration Guide for details about installing and using that product.
Listing 7-33 Listing 3-2 MsgDefAdmin
- Copyright (c) 2000 BEA Systems, Inc.
All Rights Reserved.
Distributed under license by BEA Systems, Inc.
BEA eLink Information Integrator is a registered trademark.
This product includes software developed by the Apache Software Foundation (http://www.apache.org/).
- - - BEA eLink Information Integrator 1.0 - - -
- - - Message Definition Importer Tool - - -
Enter choice:
1) Add Message Definition
2) Get Message Definition
3) Delete Message Definition
4) List Message Definitions
Q) Quit >
Supported COBOL Data Types
The COBOL Copybook Importer does not recognize all extensions to standard (ANSI) COBOL and data type size information. As a result, Copybooks that make use of non-supported extensions may not get translated correctly.
In addition, Information Integrator does not support 8 byte integer or floating point data types, and the MFL parser identifies some date fields as character. For this reason, the MFL parser includes both the original copybook entry and the results of the XML parsing in the source element for each field. You can use this information to guide you in editing the MFL data to better represent the original Copybook.
For example, if your original copybook entry appears as follows:
05 birth-date pic xx/xx/xx.
The XML translation appears as follows:
<field name="birth-date"
type="alphanum"
length="8"
picture="xx/xx/bx" align="n"/>
The MFL translation appears as follows:
<FieldFormat name='birth-date' type='EBCDIC' length='8'
source='pic xx/xx/xx.(alphanum)'/>
If you review the source element in the MFL document, you will find that the appropriate Information Integrator data type is either Smmddyy or Sddmmyy. You can decide which data type is most appropriate for the specific data.
Table F-1 lists the COBOL data types supported by the parser. Unsupported data types cause an error in the parser. All errors encountered by the parser are noted with a message that includes the line numbers in question. Since the parser generates an empty MFL document on any error, the lines containing unsupported types should either be commented out or deleted prior to running the parser.
COBOL Type |
Support |
---|---|
COMP, COMP-4, BINARY (integer) |
supported |
COMP, COMP-4, BINARY (fixed) |
supported |
COMP-3, PACKED-DECIMAL |
supported |
COMP-5, COMP-X |
supported (note 1) |
DISPLAY numeric (zoned) |
supported |
BLANK WHEN ZERO (zoned) |
supported |
SIGN IS LEADING (zoned) |
supported |
SIGN IS LEADING SEPARATE (zoned) |
supported |
SIGN IS TRAILING (zoned) |
supported |
SIGN IS TRAILING SEPARATE (zoned) |
supported |
edited numeric |
supported |
COMP-1, COMP-2 (float) |
supported |
edited float numeric |
supported |
DISPLAY (alphanumeric) |
supported |
edited alphanumeric |
supported |
INDEX |
supported |
POINTER |
supported |
PROCEDURE-POINTER |
supported |
JUSTIFIED RIGHT |
ignored |
SYNCHRONIZED |
ignored |
REDEFINES |
supported |
66 RENAMES |
not supported |
66 RENAMES THRU |
not supported |
77 level |
supported |
88 level (condition) |
ignored |
group record |
supported |
OCCURS (fixed array) |
supported |
OCCURS DEPENDING (variable-length) |
supported |
OCCURS INDEXED BY |
ignored |
OCCURS KEY IS |
ignored |
Support for the following data types is limited. The following formats will be converted to an unsigned 4 byte integer type:
05 pic 9(5) comp-5
05 pic 9(5) comp-x
The following formats will generate errors:
05 pic X(5) comp-5
05 pic X(5) comp-x
In these samples, pic 9(5) could be substituted for pic x(5).
Note: Some unsupported types can be changed to a supported type with little loss of accuracy. In the formats shown above, you could change a pic X() statement to pic 9() statement.
![]() |
![]() |
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|