When your application is unsuccessful in importing a COBOL
file into your project, your application displays an error message.
You can then correct the problem and re-import the file.
Types of Errors
Here are the types of error
messages you might encounter in your application:
- COBOL files that are part of your workspace (local): When
your application is unsuccessful in importing a local COBOL file (which
is part of the workspace) into your project, syntax error messages
appears in the task list. To view the source of the error in your
code, click the error message line in the problems view, as illustrated
here:
Errors
are also logged in a generic log file, located under the metadata
directory: [workspace]\.metadata\CommonBaseEvents.log
- COBOL files that are not part of your workspace: If the
file is not part of the workspace the syntax error messages, if any,
are logged in the log file. The error messages also show up in the
details section of the importer failure error dialog.
- Data name mangling: Only the Filler data item name is mangled
to fill_XX (where XX is a suffix that is incremented for each filler
data item encountered under a 01 level data structure. It is reset
whenever a new 01 level data structure occurs). For example
1 struct.
5 Group1.
10 Filler PIC X(30). -> fill_0
10 Sub-Group1.
15 Filler PIC x(10). -> fill_1
5 Group2.
10 Filler PIC X(30). -> fill_2
10 Sub-Group1.
15 Filler PIC x(10). -> fill_3
1 struct1.
5 Group1.
10 Filler PIC X(30). -> fill_0
10 Sub-Group1.
15 Filler PIC x(10). -> fill_1
5 Group2.
10 Filler PIC X(30). -> fill_2
10 Sub-Group1.
15 Filler PIC x(10). -> fill_3
Resolving Import Problems
- Problem: Import succeeds, but there is no data: Possible
reasons for this include
- The COBOL source is a nested program (which the COBOL importer
does not support).
- A COPY book (.cpy file) contains a complete program.
Solution
- Rename it to .cbl, .cob or .ccp
- Change the default behavior of the file extension .cpy to refer
to Full Program. You can change the file extension support for .cpy
to "FP" by using the File Extension Support table in the "More COBOL
options" tab of the COBOL importer preferences page (Window > Preferences > Importer > COBOL).
- Problem: COPY library not found: The error "COPY library
not found" error appears in the task list as follows:
The reason for this error is that the
COPYBOOK(s) are not in the same location as the main source file.
To resolve this, make sure that the COPYBOOKs are located in the same
location as the main source file. In addition, you can use the SYSLIB
table in the Preferences page to provide locations to find the copybooks.
- Problem: The current locale does not support DBCS data: The error "The current locale does not support DBCS data" appears
in the problems task list as follows:
To resolve this problem, change the compile-time locale to the
one that supports DBCS data by going into the "More COBOL options"
tab of the COBOL importer preferences page (Window > Preferences > Importer > COBOL) and select, for example, ja_JP for
"compile-time locale name."
- Problem: Non-COBOL characters were found: The error "Non-COBOL
characters were found" may appear in the problems task list as follows:

Solution- If the COBOL source has data names in DBCS, change the compile-time
locale to the one which supports DBCS data by going into the "More
COBOL options" tab of the COBOL importer preferences page (Window > Preferences > Importer > COBOL) and select say
ja_JP for "compile-time locale name".
- If the COBOL source on Linux has Windows-style line delimiters (that is, both a carriage return
and a line-feed character) instead of Linux-style line delimiter (line-feed
character only), the importer reports the error mentioned above, since
it cannot recognize the carriage return character.
- Problem: Additional configuration requirement
for Linux operating systems
- On Red Hat Linux 6.0 64-bit
or newer and Ubuntu 10 32-bit operating systems, some functions (such
as creating a J2C data binding to a COBOL file) that depend on the
COBOL importer do not work. Additional configuration is required
for Linux operating systems.
Symptom:
Cause: - The COBOL importer is a 32-bit application and requires 32-bit
versions of OS system libraries. These libraries are not installed
on RHEL 6.0 x86_64 (64-bit) or newer and Ubuntu 10 32-bit by default.
Solution: - On Red Hat Linux 6.0 64-bit
or newer, install the redhat-lsb i686 RPM. For example, on Red Hat Linux 6.0 64-bit:
- Install the required packages from the Red Hat 6.0 Workstation
i386 distribution DVD:
- Mount the DVD drive to the system.
- Insert the DVD into the DVD drive.
- Select .
- In your shell window, go to the directory that contains all the
required .rpm files. If you are using the DVD, go
to the Packages sub-directory:
cd /media/RHEL_6.0\ i386\ Disc\ 1/Packages/
- Execute the following command to install the redhat-lsb i686 RPM:
yum install redhat-lsb-4.0-2.1.el6.i686.rpm
- On Ubuntu 10 32-bit: Install the lsb-core package.