Constructing a program, Running a program – FUJITSU J Adapter Class Generator User Manual

Page 29

Advertising
background image

Chapter 3. Developing Programs 29

DISPLAY "Error Code: " errCode.
DISPLAY "Error Message: " errMessage(1:errMessageLen).
IF rc NOT = -1 THEN
DISPLAY "Java Class Name: " expClass(1:expClassLen)
DISPLAY "Java Exception Message: " expMessage(1:expMessageLen)
END-IF.
END DECLARATIVES.

Note: When the exception handling is not described in a program, the program

runtime error (JMP0104I-U) occurs due to the occurrence of the exception object.

Constructing a Program

This section explains how to construct a program that uses an adapter class, by

using the COBOL project manager.
The following files generated from the adapter class are required to construct a

program:
• Adapter class LIB file (for linkage)
• Adapter class repository file (for compilation)
Construct a program as follows:
1. Create a new project using the project manager.
2. Register the target executable program (EXE).
3. Create a COBOL source file folder and store the program source in it.
4. Create a library file folder, and store the adapter class LIB file and J adapter

class generator runtime library F3BIJART.LIB in it. F3BIJART.LIB exists in the

LIB folder of the install folder.

5. Specify compiler and link options:

-

For REPIN, specify XXX\REP (XXX is the J adapter class generator install

folder) and the folder containing the adapter class repository.

-

Specify ALPHAL (WORD) or NOALPHAL.

-

Refer to the

Fujitsu NetCOBOL User's Guide

for other options.

6. Execute "

build

."

Running a Program

The following file generated from the adapter class is required to run a program:

• Adapter class DLL file

Before running the program, add the folder containing the adapter class DLL file to

environment variable PATH.
The program can be run in the same manner as any other COBOL application. Refer

to the

Fujitsu NetCOBOL User's Guide

for details.

Note: The Java VM operating environment can be customized by specifying

environment variables (see ”JVM-INIT method (factory method)”).

Advertising