Every COBOL program which has screen input/outputs is
converted to 2 programs - one containing the screen layout, and one containing
the program logic. For example Cobol program program1 will be translated to
- CFrmProgram1.java - Screen Layouts
- CProgram1.java - Inherits from CFrmProgram1.java and
contains program logic.
The screens are based on a sub-class of java Panels
(ACMProgramPanel - source code provided), and require that the applet /
application main form to 'implement ACMAppLauncher' class (source code
provided) - and start the translated programs within a separate thread.
|
Cprogram1 |
Contains the logic of the original COBOL
structure. All screens are defined in its parent class.Use statementCprogram1.RunProgram(ACMAppLauncher
instance);to run the program from any Java applet or
application.Inherits from CfrmProgram1 - to get its
screen definitions |
|
CfrmProgram1 |
Contains the screen definitions as extracted
from original COBOL programs. Best viewed by Symantec Visual Café.
Inherits from ACMJava.awt.ACMProgramPanel . |
|
ACMProgramPanel
|
Inherits from on java.awt.Panel
. |
|
Main Application
Form |
Whether you are running your software as an
Application or Applet, you need to declare the 1st screen to implement the
ACMAppLauncher class. |
Move the all necessary folders to the main project
directory and the compiler will have access to all files without you having to
change the CLASSPATH. .For example create the following file structure
C:\Corect_output\progs --> will contain your
translated code. Compile your code from this directory
C:\Corect_output\progs\FDInc --> If system has
generated any files in the FDInc directory - move them here
C:\Corect_output\progs\WSInc --> If system has
generated any files in the WSInc directory - move them here
C:\Corect_output\progs\ACMJava -->Move / Copy ACM
classes to here..
Setup the project directories as described in
Compiling applications using Sun
JDK or Other compilers , and you can start the application from
C:\Corect_output\progs directory. For applets, create an HTML file with the
appropriat <APPLET> tag (see examples) and place in
C:\Corect_output\progs directory.
Copy the following files into your project directory
and include them into your project
- Create a new java application or Java applet.
- Add ACMDBGlobals.java . This provides the basic information
required by the system to connect to a database. YOU WILL NEED TO MAKE SOME
MODIFICATIONS TO THIS FILE TO REPRESENT YOUR SYSTEM SETTINGS. This file is
kept in \<Corect Install Directory>\Java\ACMJava .
- Include the Software Mining Components
that you intend to use in the component list of Symantec Visual Café.
These are kept in \<Corect Install Directory>\Java\ACMJava\awt. See
Installing Software Mining Components into Symantec Visual Cafe .
- Add the generated files to
the application (eg CProgram1.java & CfrmProgram1.java).
- Compile & debug the
application
If the
Symantec Visual Café does not recognise the layout of the generated screens -
try the followingWhen the
screen Frame is inherited from anything but the java.awt.Frame class, then
Symantec sometimes fails to successfully parse the screen definitions. A
solution which offen works is to make the screen programs inherit directly from
the java.awt.Frame to force the system to reparse, this usually makes Symantecs
parser to recongise the screen layout. You can change the File to inherit from
the original class AFTER Symantec Visual Cafe has recognised the screens. e.g.
change the line
public
class CFrmProgram1 extends ACMProgramPanel {
to
public
class CFrmProgram1 extends Panel {
and save
the program. This causes Symantec Visual cafe to reparse and usually recognise
the screen layouts. After it has recognized the screen layouts you can change
the line back to
public
class CFrmProgram1 extends ACMProgramPanel {
From top
menu bar select Projects|options, Go to the directories page, add the project
output directory (c:\JAVA-AP as default) to the project path.
Copy the
ACMJava directory to c:\Corect_output\ directory or alternatively you will need
to set the project path (CLass path) so it also will see this directory.
- From
the top menus Select WINDOW|Component Library
- In the
Component Library window right click the mouse and select 'Insert GROUP'.
-Change
the name of the newly inserted group to ACM
- From the
top menus Select INSERT|Component into library and specify the following files,
and insert them into the newly created 'ACM' Group:
ACMButton.class
ACMChoice.class
ACMPanel.class
ACMLabel.class
ACMList.class
ACMTextArea.class
ACMTextField.class
- Go to
component library window (tree view), right-click on the 'ACM' group and select
'Add to palette'.