|
Java and COBOL The Best of Both Worlds |
![]() |
| The SimoTime Home Page |
This web application demonstrates the use of Java Server Pages (including JSP tags, HTML and JavaScript), Java Beans, Applets, Scriptlets and COBOL programs working together in a mixed-language environment. The purpose of this suite of sample programs is to provide practical examples and possible solutions for individuals that will be creating Internet applications that may require complementary processing with a mainframe. This suite of sample programs also executes on an application server that functions independent of the mainframe.
Note: We are currently in the process of updating this application suite to use Apache Tomcat.
For example, this application suite accesses a local data set that was downloaded from a mainframe in EBCDIC format. The program could make a connection to a Mainframe to access the data set that is a VSAM Keyed, Sequential Data Set (KSDS). An example of converting between ASCII and EBCDIC is also provided in the data access member.
This set of programs was created and/or downloaded from a mainframe system as a result of a "Discovery Session and Proof-of-Concept" project to determine the feasibility and possible approaches of extending mainframe application functionality to the Internet. The initial analysis reduced the focus to the following three possibilities.
| ||||||||
| Top Three Choices for a Possible Solution |
One of the goals was to complete the "Discovery Session and Proof-of-Concept" within fifteen (15) days. This required a focus on a sampling of typical routines used in the mainframe application. Six functions were selected and the corresponding mainframe COBOL programs were downloaded from the Mainframe System running ZOS to a Windows System running a Micro Focus Enterprise Server.
The "Java Rewrite" numbers are estimates. The time estimates to rewrite exceeded the scope of the "Discovery Session and Proof-of-Concept". An attempt was made to access the data base for the "Customer Inquiry" function using Java. It was quickly determined that Java does not have native support for Indexed or Keyed files. Converting the data base to a relational data base was discussed. This is a possibility but was not included as part of this project.
| Description of Function | Create JSP | Java API | COBOL Reuse | Java Rewrite |
| Access a Data Base | 0.50 | 0.50 | 0.25 | 3.00 |
| Write to a Journal or Log File | 0.75 | 0.50 | 0.25 | 1.50 |
| Create a Text String from Numbers | 0.50 | 0.50 | 0.25 | 4.50 |
| Date Validation-Conversion-Formatting | 0.50 | 0.75 | 0.25 | 5.00 |
| Date Difference Routine | 0.50 | 0.50 | 0.25 | 2.00 |
| Hex-Dump Routine for Debugging | 0.50 | 0.50 | 0.25 | 5.00 |
| Total Number of Days | 3.25 | 3.25 | 1.50 | 21.00 |
Note: The technical evaluation phase took eight days. Doing the documentation took an additional four days.
We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.
Copyright © 1987-2025
SimoTime Technologies and Services
All Rights Reserved
This complete online business function is not being replaced. The current use of mainframe terminals by trained employees will continue. The "application extension" to allow customers to view and possibly update their information via the Internet will be a subset of the complete business function. The complete business function could be ported to the Internet or an Intranet but this should be a second phase or separate project.
Also, it should be noted that providing access to business functions by individuals outside a company may require a much higher level of usability than the current legacy systems provides. It should not be assumed that what can be accomplished within a company by a skilled employee can be easily mastered by a first time user that is not familiar with the application. Improved messages will be needed when an individual does not follow the business rules. Readily available help text will be a requirement when moving to the Internet.
The size and complexity of the examples in this project were small in comparison with the size and complexity of some of the legacy programs running critical business functions on the host system. Re-writing everything in Java for the Internet could not be done within the business time frame and cost objectives.
This option requires a teaming of both COBOL and Java programmers. An individual that is familiar with the techniques of providing documentation in a hypertext environment should be part of the team. Also, the software vendor that provides the API for the different languages should be included as part of the team. For this project the Micro Focus involvement was essential in order to meet the target date.
This application requires Enterprise Developer or Visual COBOL, version 2.2.
Micro Focus Enterprise Developer or Visual COBOL brings the productivity and collaboration of modern, industry-leading Integrated Development Environments (IDEs) to core COBOL systems – including deploying key business-critical COBOL applications to Windows, UNIX, Linux, .NET, JVM and the cloud.
Explore the Micro Focus Web Site via an Internet Connection for more information about products and services available from Micro Focus.
Oracle acquired Sun Microsystems in 2010, and since that time Oracle's hardware and software engineers have worked side-by-side to build fully integrated systems and optimized solutions. Sun's software portfolio has continued to develop as well, with new releases of Oracle Solaris, MySQL, and the recent introduction of Java 7.
Micro Focus Visual COBOL brings the productivity and collaboration of modern, industry-leading Integrated Development Environments (IDEs) to core COBOL systems – including deploying key business-critical COBOL applications to Windows, UNIX, Linux, .NET, JVM and the cloud.
For more information refer to the Java Information provided by Oracle and Sun Microsystems Web Site.
Apache Tomcat (or Tomcat, formerly Jakarta Tomcat) is an open source web server and servlet container developed by the Apache Software Foundation (ASF). Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems. Tomcat provides a "pure Java" HTTP web server environment for Java code execution.
This section contains a description of "how to" use the applications provided within this demonstration package. A detailed specification for how each application is structured is provided in the System Information section of this document.
This suite of "Application Examples" contains a menu-of-applications page, six mini-applications and the documentation or help text. To display the menu the local Web Server must be started (refer to the Starting the Apache Web Server section of this document).
To display the menu-of-applications page select the Net Express, "COBOL and Java Project" icon from the desktop.
The following (EZJVMENU.cmd) is the Windows Command File used to display the primary menu screen for the application examples.
@echo OFF
set CmdName=EZJVMENU
rem * *******************************************************************
rem * Batch Job Script - a Windows Command File *
rem * This Job Script is provided by SimoTime Technologies *
rem * (C) Copyright 1987-2020 All Rights Reserved *
rem * Web Site URL: http://www.simotime.com *
rem * e-mail: helpdesk@simotime.com *
rem * *******************************************************************
rem *
rem * Text - Display Demo Menu.
rem * Author - SimoTime Technologies
rem * Date - January 24, 1996
rem *
rem * *******************************************************************
rem * Step 1, Set the Environment...
rem *
call ..\ENV1BASE %CmdName%
if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
set JobStatus=0000
cd\
cd %BASELIB1%\LOADLIB
rem *
call SimoNOTE "*******************************************************%CmdName%"
call SimoNOTE "* Starting CmdName %CmdName%"
rem *
rem * *******************************************************************
rem * Step 2, Display Menu Page, menuj001.htm ...
rem *
call SimoNOTE "* CATALINA_HOME ... %CATALINA_HOME%"
call SimoNOTE "* JRE_HOME ........ %JRE_HOME%"
call SimoNOTE "* CLASSPATH ....... %CLASSPATH%"
call SimoNOTE "* SYSOUT .......... %SYSOUT%"
call SimoNOTE "* Bulletin Display the Menu Page"
rem C:\Users\Larry\AppData\Local\Google\Chrome\Application\chrome.exe http://localhost:8080/tomcat/tomcat
rem start C:\Users\Larry\AppData\Local\Google\Chrome\Application\chrome.exe %BASELIB1%\WEBPAGES\menuj001.htm
rem start C:\Users\Larry\AppData\Local\Google\Chrome\Application\chrome.exe http://localhost:8080/simotcat/menuj001.htm
start "c:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://localhost:8080\simotcat\menuj001.htm
rem "c:\Program Files (x86)\Internet Explorer\iexplore" C:\AC2014\SP02\DEVL\JAVA\menuj001.htm
if not ERRORLEVEL = 0 set JobStatus=0010
if not %JobStatus% == 0000 goto :EojNok
:EojAok
call SimoNOTE "* Simonote JobName %CmdName%, Display Menu using Chrome Browser"
call SimoNOTE "* Finished JobName %CmdName%, Job Status is %JobStatus%"
goto :End
:EojNok
call SimoNOTE "* ABENDING JobName %CmdName%, Job Status is %JobStatus%"
:End
if not "%1" == "nopause" pause
To retrieve customer information simply type a six-digit customer number and press the Continue button.
The local Data Base contains twenty-six (26) records. The Customer numbers are six digits. Valid customer numbers are 00nn00 where nn is 01-26.
If a valid customer key is requested the name, address, city, state/province and postal code will be displayed. Otherwise, a message will be displayed.
Refer to the System Information, Customer Inquiry, Structure and Design section of this document for detailed specifications.
This section describes how to use the "Customer Registration" option to save information that has been typed by the user.
Refer to the System Information, Customer Registration, Structure and Design section of this document for detailed specifications.
To display a check image simply type a name and an amount and press the Do a Check button. The numeric amount will be subjected to "reasonability" checks.
If the amount is "reasonable" a check image will be displayed with both a numeric and a converted text string showing the amount. Otherwise, a message will be displayed.
Refer to the System Information, Write me a Check, Structure and Design section of this document for detailed specifications.
This example will prompt a user for a date in the ccyymmdd format. The user types a date and clicks on the Vali-DATE button. The user date will then be processed by the date validation and editing routine.
If the user date is valid (i.e. meets the reasonability checks) the various date formats are displayed. Otherwise, an error message will be displayed.
The following is an example of the contents of the input or date-card.
DATECARD 2000/04/01
The following is an example of the date information provided by the date routine.
Gregorian Date .............. 20000401 Edited Gregorian Date ....... 2000-04-01 Text for the Date............ April 1, 2000 Julian Date ................. 2000092 Days remaining in the year .. 274 Leap Year Flag (Y or N) ..... Y Days in the Month ........... 30 Text for the Month .......... April
Refer to the System Information, Show Me the Date, Structure and Design section of this document for detailed specifications.
This example will prompt a user for a date of birth in the ccyymmdd format. The user types a date and clicks on the Calculate Age button. The number of days since the user's birth date and today's date will then be calculated and the results displayed.
If the user birth date is valid (i.e. meets the reasonability checks) the difference in days will be displayed. Otherwise, an error message will be displayed.
Refer to the System Information, What is my Age, Structure and Design section of this document for detailed specifications.
This example will prompt a user for a text string. The user types a maximum of sixteen (16) characters and clicks on the Do HexDump button. The contents of the text string will be converted to a hexadecimal dump format and this will be displayed at the Server console and be written to the SYSLOG file.
Refer to the System Information, Show Me the Hexadecimal Dump, Structure and Design section of this document for detailed specifications.
The purpose of this section is to provide additional information for the Help Desk and programming support staff.
The following diagram shows the model sub-directory structure for the Application Libraries and the DEVELOPMENT environment. The Application Libraries are typically a sub-directory under a directory structure for a Development, Production or Test environments. Update or change capability to the Application Library structure and content may be limited to system and support individuals. Read or view access typically has a larger audience.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Note-1: This is the primary directory for the SimoTime Driver Programs and Test Cases | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Note-2: This is the Development, Production or Test directory, for this example it is set to DEVL. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Note-3: Utility programs using a mainframe dialect, not part of application business functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Note-4: Utility programs using a Micro Focus dialect, not part of application business functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Note-5: Utility programs with specialized or unique requirements |
| The Directory Structure used in the in the SimoTime Development Environment |
Color Associations: The
This section describes the two Windows commands used to set the environment. The first command will set the common or shared environment variables used (or called) by many other commands in this suite of programs. The second command will set the environment variables that are unique to the Java environment.
The following (ENV1BASE.cmd) is the Windows Command File used to set the environment variables that are shared across many of the application and system functions.
@echo OFF
rem * *******************************************************************
rem * ENV1BASE.cmd - a Windows Command File *
rem * This program is provided by SimoTime Technologies *
rem * (C) Copyright 1987-2021 All Rights Reserved *
rem * Web Site URL: http://www.simotime.com *
rem * e-mail: helpdesk@simotime.com *
rem * *******************************************************************
rem *
rem * Text - Provide a single point to set common environment variables.
rem * Author - SimoTime Technologies
rem * Date - January 24, 1996
rem *
rem * Set the commonly used environment variables. This is used to provide
rem * a single point for managing the commonly used environment variables.
rem *
set SimoLIBR=c:\SimoLIBR
set BASELIB1=c:\SIMOSAM1\DEVL
set BASELIB8=c:\SimoSAM8
set BaseWIP1=c:\SimoSAM1\WIP1
set DATAZERO=c:\SIMODATA\DEVL\DATA\ZERO
set BASEAPP=%BaseLib1%
set BASESYS=%BaseLib1%\SYS1
set BASECAT=%BaseLib1%\DATA
set UMAPALIB=%BASECAT%\ASC1
set UMAPELIB=%BASECAT%\EBC1
set SYSLOG=%BASESYS%\LOGS\SYSLOG_USER.DAT
set SYSOUT=%BASEAPP%\LOGS\SYSOUT_SIMSAM01.txt
set SLZMSG=%BASEAPP%\LOGS\SLZMSG_USER.TXT
set PostNOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.TXT
set SIMONOTE=%BASEAPP%\LOGS\JOBLOG_SIMONOTE.txt
set USERPOST=%BASEAPP%\LOGS\ASSIGNED_USER_POST_FILE.txt
if [%1]==[] goto NO_POST
set SYSOUT=%BaseLib1%\LOGS\SYSOUT_%1.txt
call SIMONOTE "+ ENV1BASE *"
call SIMONOTE "+ ENV1BASE ********************************************************************%1"
call SIMONOTE "+ ENV1BASE is preparing the System Environment..."
call SIMONOTE "+ SIMOLIBR is %SIMOLIBR%"
call SIMONOTE "+ MIFOSYS1 is %MIFOSYS1%"
call SIMONOTE "+ BASELIB1 is %BASELIB1%"
:NO_POST
call SIMONOTE "+ SIMONOTE Job Log File is %SIMONOTE% "
rem *
set MQBASE=C:\Program Files\IBM\WebSphere MQ
rem *
rem * Set the location for the Apache-Tomcat Server...
set CATALINA_HOME=C:\APACHETC\apache-tomcat-7.0.52
rem set CATALINA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_112
rem *
rem * Set the Environment for the Java Environment...
rem set JAVABASE=C:\APACHETC\apache-tomcat-7.0.52
set JAVABASE=C:\Program Files (x86)\Java\jdk1.8.0_112
set JAVASDK="%JAVABASE%\bin"
set JAVA_HOME=%JAVABASE%
set JRE_HOME=%JAVABASE%
set SIMOTCAT=%CATALINA_HOME%\webapps\simotcat
set SIMPACKS=%CATALINA_HOME%\webapps\simotcat\WEB-INF\classes\simpacks
rem *
rem * Set the environment for the Micro Focus technology...
set MIFOEDEV=C:\Program Files (x86)\Micro Focus\Enterprise Developer
set MIFOVCBL=C:\Program Files (x86)\Micro Focus\Visual COBOL Build Tools
set MIFOESTU=C:\Program Files (x86)\Micro Focus\Studio Enterprise Edition 6.0
set MIFOEMFE="C:\Program Files (x86)\Micro Focus\Mainframe Express"
rem *
rem * Large file support, performance tuning and record locking of the File Handler
set EXTFH=%BASESYS%\CONFIG\EXTFHBIG.CFG
rem *
rem * For IMS Support
set ES_IMSLIB=%BASEAPP%\IMSLIB
set ES_ACBLIB=%BASEAPP%\IMSLIB
rem *
rem * EZASOKETS Check EZASOKETS Enabled box or set ES_EZASOKET_SUPPORT=YES
set EZACONFG=BASESYS1\CONFIG\EZACONFG.dat
rem *
rem * Resource Allocation and Performance for SORT and non-Relational Data
rem set MFJSENGINE=SYNCSORT
set SORTSCHEME=1
set SORTSPACE=750000000
set TMP=C:\SORTWORK
rem *
set ES_ALLOC_OVERRIDE=%BASESYS%\CONFIG\CATMAPA1.cfg
rem * For CORE_ON_ERROR function, ABEND Dump
rem * set COBCONFIG_=%BASESYS%\CONFIG\diagnose.cfg
rem *
rem * Consolidated Trace Facility (CTF)
rem * set MFTRACE_CONFIG=%BASESYS%\CONFIG\ctf.cfg
rem * set MFTRACE_LOGS=c:\ctflogs
rem *
rem * For Job Restart, ABEND Recovery
set MF_UCC11=Y
set ES_JES_RESTART=Y
rem *
rem * Set environment for MFBSI (Micro Focus Batch Scheduling Interface)
set ES_EMP_EXIT_1=mfbsiemx
set MFBSI_DIR=%BASESYS%\LOGS\%JESSERVERNAME%
set MFBSIEOP_CMD=ENABLE
set MFBSIEOP_CSV=ENABLE
set MFBSIEOP_HTM=ENABLE
set MFBSIEOP_XML=ENABLE
rem *
rem * Set Behavior and Trace Flags for GETJOBDD
rem * Position=12345678/12345678
set JDDFLAGS=nnnWnnnn/YYnnnnnn
rem *
rem * If not already set then set the PATH for Micro Focus Directories
if "%SIMOPATH%" == "Y" goto JUMPPATH
if "%MIFOSYS1%" == "EDEV" goto JUMPEDEV
if "%MIFOSYS1%" == "VCBL" goto JUMPVCBL
if "%MIFOSYS1%" == "ESTU" goto JUMPESTU
if "%MIFOSYS1%" == "EMFE" goto JUMPEMFE
:JUMPEDEV
set path=%BASESYS%\LOADLIB;%MIFOEDEV%\bin;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOEDEV%\CPYLIB
set MIFOBASE=%MIFOEDEV%
goto JUMPPATH
:JUMPVCBL
set path=%MIFOVCBL%\bin;%MIFOVCBL%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
set MIFOBASE=%MIFOVCBL%
goto JUMPPATH
:JUMPESTU
set MIFOBASE=%MIFOESTU%\Base
set MIFOBIN=%MIFOBASE%\bin
set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE
goto JUMPPATH
:JUMPEMFE
set MIFOBASE=%MIFOEMFE%\Base
set MIFOBIN=%MIFOBASE%\bin
set path=%BASESYS%\LOADLIB;%MIFOBASE%;%MIFOBIN%;%JAVASDK%;%BASEAPP%\JAVA;%PATH%;
set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%;%MIFOBASE%\SOURCE
goto JUMPPATH
rem *
:JUMPPATH
set SIMOPATH=Y
rem *
set MAINFRAME_FLOATING_POINT=true
set COBIDY=%BASEAPP%\COBIDY
set COBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR%
set LIBPATH=.;%BASEAPP%\LOADLIB;%BASEAPP%\LOADLIB\GNTS;%BASESYS%\LOADLIB;%SimoLIBR%
set TXDIR=%BASESYS%\LOADLIB;%MIFOBASE%
set CobCpy=%BASEAPP%\CobCpy1;%BASEAPP%\CobCpy2;%BASEAPP%\CobCpy6;%SimoLIBR%
rem *
set USERCLASS=%BASELIB1%\LOADLIB
set CLASSPATH=.
set CLASSPATH=%CLASSPATH%;%JAVABASE%
set CLASSPATH=%CLASSPATH%;%JAVABASE%\lib
set CLASSPATH=%CLASSPATH%;\%USERCLASS%\simpacks
set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes
set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes\simpacks
rem *
if "%MIFOSYS1%" == "ESTU" set CLASSPATH=%CLASSPATH%;%MIFOBIN%
if "%MIFOSYS1%" == "EDEV" set CLASSPATH=%CLASSPATH%;%MIFOEDEV%
if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%
if "%MIFOSYS1%" == "VCBL" set CLASSPATH=%CLASSPATH%;%MIFOVCBL%\bin\mfcobol.jar
rem *
set JobStatus=0000
call SIMONOTE "+ ENV1BASE is returning to caller"
The following (ENV1JAVA.cmd) is the Windows Command File used to set the environment variables that are required by the Java Development or Run Time sub-system.
@echo off
call SIMONOTE "* ENV1JAVA is STARTING... "
rem *
rem * The following statement will cause the COBOL programs to
rem * be compiled with ANIMATION enabled.
rem *
set jlibenv=YES
call SIMONOTE "* JAVABASE is %JAVABASE% "
rem *
set USERCLASS=%BASELIB1%\LOADLIB
set APACHEST=C:\Program Files (x86)\Apache Group\Apache2
set CLASSPATH=.
set CLASSPATH=%CLASSPATH%;%JAVABASE%
set CLASSPATH=%CLASSPATH%;%JAVABASE%\lib
set CLASSPATH=%CLASSPATH%;\%USERCLASS%
set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\ap01jv01\WEB-INF\classes
set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\ap01jv01\WEB-INF\classes\simpacks
set CLASSPATH=%CLASSPATH%;C:\Program Files (x86)\Micro Focus\Visual COBOL\bin
rem *
SET CUSTMAST=%BASELIB1%\DATA\APPL\ebc00256.ksd
rem *
SET SYSLOG=%BASELIB1%\DATA\APPL\syslog.txt
if not exist %SYSLOG% echo * SYSLOG creation . . . >%SYSLOG%
rem *
SET SYSJRNL=%BASELIB1%\DATA\APPL\sysjrnl.txt
if not exist %SYSJRNL% echo * SYSJRNL creation...>%SYSJRNL%
rem *
call SIMONOTE "* ENV1JAVA is Finished... "
This section will describe the development tasks for compiling the COBOL and Java programs and the System tasks for starting and stopping i.e. shutdown) of the Apache Tomcat Web Server.
The process to compile and link the COBOL programs uses two command files and a list of COBOL source members. The primary command reads the list file and for each record in the list file a call is made to the secondary command to do the COBOL compile and link.
The following (CBBLDLW1.cmd) is the primary Windows Command File for the COBOL compile and link. This command uses a Windows "FOR" command to read a list file of COBOL source member names and does a call to a secondary command to do a COBOL compile and link for each member in the list.
@echo OFF
echo *********************************************************************
echo * CBBLDLW1.CMD - a Windows Command File *
echo * This program is provided by SimoTime Enterprises *
echo * (C) Copyright 1987-2014 All Rights Reserved *
echo * Web Site URL: http://www.simotime.com *
echo * e-mail: helpdesk@simotime.com *
echo *********************************************************************
rem *
rem * This command will read a file that contains a list of COBOL batch
rem * programs without SQL and call ZCBL2GNT to compile each member.
rem *
rem * This procedure calls the following Windows Command Files.
rem * 1. ENV1BASE.cmd - this provides a single point for setting commonly
rem * used environment variables.
rem * 2. SimoNOTE.cmd - this provides a consistent process for displaying
rem * messages to the screen and writing to a journal
rem * or log file.
rem * 3. CBBLDLW8.cmd - this will do the compile of the specified program
rem *
rem * Note: To specifiy the directory to be used for the IDY files use
rem * the COBIDY Compiler Directive and set the COBIDY environment
rem * variable.
rem * *******************************************************************
setlocal
call ..\ENV1BASE
set CmdName=CBBLDLW1
set JobStatus=0000
rem *
call SimoNOTE "*******************************************%CmdName%.cmd"
call SimoNOTE "Starting JobName %CmdName%.cmd"
rem *
rem * Set the environment variable to use the default directives file.
set zDIRS=ZDIRNOAN.dir
rem * The following two statements will set the environment variables to
rem * a "Y" for Yes or "N" for No. A "Y" will cause the function to be
rem * performed by the called procedure. An "N" value will not perform the
rem * function.
set TransferDLL=N
set EraseAfter=N
set EraseOBJ=N
set EXTFH=%BASESYS%\CONFIG\EXTFHTAB.CFG
rem *
rem * Read the ListSam1CobolBatchLessExt.TXT file and pass the contents of each record to the
rem * command file that does the actual compile. Each record in the file
rem * contains an eight character program name.
set SLIB1=%BASELIB1%\JAVA
set TLIB1=%BASELIB1%\JAVA
set AOK_Count=0
set NOK_Count=0
set MemberList=CBL_MBRS.txt
for /F "eol=; tokens=1,2* delims=." %%i in (%MemberList%) do call CBBLDLW8 %%i
rem *
call SimoNOTE "AOKcount Compile Count for AOK is %AOK_Count% "
call SimoNOTE "NOKcount Compile Count for NOK is %NOK_Count% "
if %NOK_Count% == 0 goto EOJAOK
goto EOJNOK
:EOJNOK
call SimoNOTE "ABENDING JobName %CmdName%.cmd"
goto EOJEND
:EOJAOK
call SimoNOTE "Finished JobName %CmdName%.cmd"
:EOJEND
if not "%SimoGENS%" == "BATCH" pause
endlocal
pause
The following (CBBLDLW8.cmd) is the secondary Windows Command File for the COBOL compile and link. This command will execute the "CBLLINK" program to compile and link a single COBOL program based on the source member name specified as the first parameter.
rem * *******************************************************************
rem * CBBLDLW8.cmd - a Windows Command File *
rem * This program is provided by SimoTime Enterprises *
rem * (C) Copyright 1987-2014 All Rights Reserved *
rem * Web Site URL: http://www.simotime.com *
rem * e-mail: helpdesk@simotime.com *
rem * *******************************************************************
rem * It is the callers reponsibility to set the following environment
rem * variable prior to calling the command.
rem * 1. BaseLib1 - point to the base directory. This procedure uses
rem * various sub-directories under the base directory.
rem * 2. DirsLib1 - point to the directory that contains the DIR files.
rem * 3. zDIRS - point to the fully qualified name of the default
rem * directives file.
rem *
rem * The following parameters are received from the calling command.
rem * Parameter Description
rem * --------- --------------------------------------------------------
rem * 1. Name of source member
rem * 2. Name of source directory relative to BaseLib1
rem * 3. Name of directory for load member relative to BaseLib1
rem * --------- --------------------------------------------------------
rem * 4. Expected parameters are as follows.
rem * Parm-1 - Member name without extension
rem * Parm-2 - Name of source directory relative to BaseLib1
rem * Parm-3 - Name of output directory relative to BaseLib1
rem * *******************************************************************
rem * The following two statements will first set the compile options to
rem * use the directives file specified in the zDIRS environment variable.
rem * The second statement will then check for a .DIR file with the same
rem * name as rem * the program.
rem * If this exists then it will override zDIRS value.
rem *
rem *
echo Parameter 1 is %1
echo CobCpy is %CobCpy%
set Compile2DLLStatus=0000
set CompileOptions=%zDIRS%
if exist %BaseLib1%\DIRS\%1.DIR set CompileOptions=%BaseLib1%\DIRS\%1.DIR
call SIMONOTE "CBBLDLW8 is executing"
call SimoNOTE "COBCPY is %COBCPY%"
call SimoNOTE "Directory file is %CompileOptions%"
rem *
rem * The -bbs will
rem * The -rE will cause the exectable to link with the current run time.
rem *
cbllink -d -rE -u%CompileOptions% -O%TLIB1%\%1.dll %SLIB1%\%1.cbl
if not "%ERRORLEVEL%" == "0" set Compile2DLLStatus=0010
if not "%Compile2DLLStatus%" == "0000" goto :Compile2DLLNOK
rem *
if exist %TLIB1%\%1.dll goto :Compile2DLLAOK
set Compile2DLLStatus=0020
goto :Compile2DLLNOK
rem *
:Compile2DLLNOK
set /A NOK_Count=%NOK_Count% + 1
set JobStatus=%Compile2DLLStatus%
call SimoNOTE "ABENDING JobStep Compile Step, Status is %Compile2DLLStatus%, Program is %1"
goto :End
rem *
:Compile2DLLAOK
if %TransferDLL%==Y (echo Transfer DLL is ENABLED
COPY /Y %BaseLib1%\StagLib1\%1.DLL %BaseLib1%\ProdREC1\%1.DLL)
if %EraseAfter%==Y (echo Erase After is ENABLED
ERASE %BaseLib1%\StagLib1\%1.DLL)
if %EraseOBJ%==Y (echo Erase Object is ENABLED
ERASE %BaseLib1%\Adm1\%1.OBJ)
set /A AOK_Count=%AOK_Count% + 1
call SimoNOTE "Complete JobStep Compile Step, Status is %Compile2DLLStatus%, Program is %1"
goto :End
rem *
call SimoNOTE "Produced LogFile %SYSLOG%"
if "%JobStatus%" == "0000" goto :EOJAOK
goto :EOJNOK
rem *
rem * *******************************************************************
:EOJAOK
call SimoNOTE "Finished JobName zCompileModsDLLs01.CMD"
goto :End
rem *
rem * *******************************************************************
:EOJNOK
call SimoNOTE "ABENDING JobName zCompileModsDLLs01.CMD"
goto :End
rem * *******************************************************************
:End
echo CobCpy is %CobCpy%
The process for compiling the Java programs uses two command files and a list of java source members. The primary command reads the list file and for each record in the list file a call is made to the secondary command to do the Java compile.
The following (JVBLDLW1.cmd) is the primary Windows Command File for the Java compile. This command uses a Windows "FOR" command to read a list file of java source member names and does a call to a secondary command to do a Java Compile for each member in the list.
@echo off
rem * *******************************************************************
rem * JVBLDLW1.cmd - a Windows Command File *
rem * This program is provided by SimoTime Enterprises *
rem * (C) Copyright 1987-2014 All Rights Reserved *
rem * Web Site URL: http://www.simotime.com *
rem * e-mail: helpdesk@simotime.com *
rem * *******************************************************************
rem * Text - Primary Windows Command File for a Java compile process.
rem * Author - SimoTime Enterprises
rem * Date - January 24, 1999
rem *
rem ****************************************************************
rem * This is the primary Windows Command File for the Java compile.
rem * This command uses a Windows "FOR" command to read a list file
rem * and call the second command to do a Java Compile.
rem ****************************************************************
rem *
call ..\ENV1BASE
set JobStatus=0000
set JobName=JVBLDLW1
rem *
call SimoNOTE "*******************************************************%JobName%"
call SIMONOTE "* Starting %JobName% for Java Compiles..."
set CLASSPATH=%CLASSPATH%;%BASELIB1%\JAVA
rem *
set SIMOMODE=BATCH
set MemberList=JAVAMBRS_AP03.txt
call SIMONOTE "* JVBLDLW1 MIFOSYS1 is ....... %MIFOSYS1% "
call SIMONOTE "* JVBLDLW1 Member List is .... %MEMBERLIST% "
call SIMONOTE "* JVBLDLW1 JAVABASE is ........ %JAVABASE% "
call SIMONOTE "* JVBLDLW1 CLASSPATH is ...... %CLASSPATH% "
for /F "eol=; tokens=1,2* delims=." %%i in (%MemberList%) do call JVBLDLW7 %%i
if "%JobStatus%" == "0000" call SIMONOTE "* Finished %JobName% for Java Compiles, Job Status is %JobStatus%"
if not "%JobStatus%" == "0000" call SIMONOTE "* ABENDING %JobName% for Java Compiles, Job Status is %JobStatus%"
set SIMOMODE=
pause
:END
The following (JVBLDLW8.cmd) is the secondary Windows Command File for the Java compile. This command will execute the "javac" program to compile a single java program based on the source member name specified as the first parameter.
@echo off
rem * *******************************************************************
rem * JVBLDLW8.cmd - a Windows Command File *
rem * This program is provided by SimoTime Enterprises *
rem * (C) Copyright 1987-2014 All Rights Reserved *
rem * Web Site URL: http://www.simotime.com *
rem * e-mail: helpdesk@simotime.com *
rem * *******************************************************************
rem * Text - Secondary Windows Command File for a Java compile process.
rem * Author - SimoTime Enterprises
rem * Date - January 24, 1999
rem *
rem ****************************************************************
rem * This command will execute the "javac" program to compile a
rem * single java program based on the source member name provide
rem * by parameter one.
rem ****************************************************************
rem *
call SimoNOTE "* --------------------------------------------------- *JVBLDLW8"
call SIMONOTE "* Starting Compile for %1"
if exist %1.class erase %1.class
%JAVASDK%\javac %1.java -Xlint
if exist %1.class call SIMONOTE "* Finished Compile for %1"
if exist %1.class goto :END
set JobStatus=0016
call SIMONOTE "* ABENDING Compile for %1"
:END
The following (SYS1TCOPEN.cmd) is the Windows Command File used to start the Apache Web Server.
@echo OFF
set CmdName=SYS1TCOPEN
rem * *******************************************************************
rem * Batch Job Script - a Windows Command File *
rem * This Job Script is provided by SimoTime Technologies *
rem * (C) Copyright 1987-2020 All Rights Reserved *
rem * Web Site URL: http://www.simotime.com *
rem * e-mail: helpdesk@simotime.com *
rem * *******************************************************************
rem *
rem * Text - Start Apache/Tomcat Server.
rem * Author - SimoTime Technologies
rem * Date - January 24, 1996
rem *
rem * This user-defined job script will set the necessary environment
rem * variables and start the Apache Tomcat Server.
rem *
rem * Ths script will make calls to the following Windows Command Files.
rem * 1. ENV1BASE.CMD - this provides a single point for setting commonly
rem * used environment variables.
rem * 2. SIMONOTE.CMD - this provides a consistent process for displaying
rem * messages to the screen and writing to a journal
rem * or log file.
rem *
rem * *******************************************************************
rem * Step 1, Set the Environment...
rem *
call ..\..\ENV1BASE %CmdName%
if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
set JobStatus=0000
rem *
call SIMONOTE "*******************************************************%CmdName%"
call SIMONOTE "* Starting CmdName %CmdName% - Start Apache/Tomcat Server"
rem *
rem * *******************************************************************
rem * Step 2, Start Apache/Tomcat Server...
rem *
call SIMONOTE "* CLASSPATH ........ %CLASSPATH%"
call SIMONOTE "* CATALINA_HOME .... %CATALINA_HOME%"
call SIMONOTE "* JRE_HOME ......... %JRE_HOME%"
call SIMONOTE "* Bulletin Startup Tomcat"
rem *
set PATHLOGFILE=%BASELIB1%\LOGS\
set PATHPCFCOMP=%BASELIB1%\SIMOGENS\COMPARES\
set PATHPCFHOLD=c:\AC2020\SP06\DEVL\HOLD\JVUI\
call SIMONOTE "PATHLOGCOMP=%PATHLOGCOMP%"
rem * The following call statement will startup the Apache/Tomcat Server
call %CATALINA_HOME%\bin\startup
rem * The preceding call statement will startup the Apache/Tomcat Server
if not ERRORLEVEL = 0 set JobStatus=0010
if not %JobStatus% == 0000 goto :EojNok
:EojAok
call SIMONOTE "* Finished JobName %CmdName%, Job Status is %JobStatus%"
goto :End
:EojNok
call SIMONOTE "* ABENDING JobName %CmdName%, Job Status is %JobStatus%"
:End
if not "%1" == "nopause" pause
The following (SYS1TCSHUT.cmd) is the Windows Command File used to start the Apache Web Server.
@echo OFF
set CmdName=SYS1TCSHUT
rem * *******************************************************************
rem * Batch Job Script - a Windows Command File *
rem * This Job Script is provided by SimoTime Technologies *
rem * (C) Copyright 1987-2020 All Rights Reserved *
rem * Web Site URL: http://www.simotime.com *
rem * e-mail: helpdesk@simotime.com *
rem * *******************************************************************
rem *
rem * Text - Shutdown Apache/Tomcat Server.
rem * Author - SimoTime Technologies
rem * Date - January 24, 1996
rem *
rem * This user-defined job script will set the necessary environment
rem * variables and shutdown the Apache Tomcat Server.
rem *
rem * Ths script will make calls to the following Windows Command Files.
rem * 1. ENV1BASE.CMD - this provides a single point for setting commonly
rem * used environment variables.
rem * 2. SIMONOTE.CMD - this provides a consistent process for displaying
rem * messages to the screen and writing to a journal
rem * or log file.
rem *
rem * *******************************************************************
rem * Step 1, Set the Environment...
rem *
call ..\..\ENV1BASE %CmdName%
if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
set JobStatus=0000
rem *
call SIMONOTE "*******************************************************%CmdName%"
call SIMONOTE "* Starting Job Name is %CmdName% - Shutdown Tomcat Server"
rem *
rem * *******************************************************************
rem * Step 2, Shutdown Apache/Tomcat Server...
rem *
call SIMONOTE "* Bulletin Shutdown Tomcat"
rem * The following call statement will shutdown the Apache/Tomcat Server
call %CATALINA_HOME%\bin\shutdown
rem * The preceding call statement will shutdown the Apache/Tomcat Server
if not ERRORLEVEL = 0 set JobStatus=0010
if not %JobStatus% == 0000 goto :EojNok
:EojAok
call SIMONOTE "* Finished Job Name is %CmdName%, Job Status is %JobStatus%"
goto :End
:EojNok
call SIMONOTE "* ABENDING Job Name is %CmdName%, Job Status is %JobStatus%"
:End
if not "%1" == "nopause" pause
When creating a user desktop environment that includes the mainframe as a shared component some of the key items to consider are as follows.
The following is an overview of the SimoTime "COBOL and Java" Application.
|
|
|
|
|
|
|
| 1. | Send an e-mail to our helpdesk. |
| 1.1. | helpdesk@simotime.com. |
| 2. | Our telephone numbers are as follows. |
| 2.1. | 1 415 763-9430 office-helpdesk |
| 2.2. | 1 415 827-7045 mobile |
We appreciate hearing from you.
SimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.
Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.
Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process. SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.
Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com
| Return-to-Top |
| Java and COBOL, the Best of Both Worlds |
| Copyright © 1987-2025 SimoTime Technologies and Services All Rights Reserved |
| When technology complements business |
| http://www.simotime.com |