Fujitsu J Adapter Class Generator Portable Generator User Manual


 
Chapter 7. Samples
Sample 1 – Using Classes
Example 1: Example of using java.lang.System,
java.io.PrintStream, and java.util.Date classes
This section explains the “Sample Program - Example 1 ” provided with this product.
Example 1 shows how the java.lang.System, java.io.PrintStream, and java.util.Date
classes of Java are used from COBOL.
Outline
Generate an instance of the java.util.Date class and place the content on the
standard output (class variable out of the java.lang.System class).
Distribution files
JADP01.TXT (program description)
JAVA2COB.MGT (generation name management file)
DATEMAIN.PRJ (project file)
DATEMAIN.CBI (compiler option file)
DATEMAIN.COB (COBOL source program)
DATE01JAVA.PRJ (project file)
DATE01JAVA.CBI (compiler option file)
DATE01JAVA2.PRJ (project file)
DATE01JAVA2.CBI (compiler option file)
COBOL functions used
Object-oriented programming functions:
Object generation
Method invocation
Java classes used
java. lang. System
java. io. PrintStream
java. util. Date