SW Infor
Migration Tools
Java/SQL databases/Shell Script Aproach

Automatic Mainframe Migration: a winner strategy



SW-Eagle framework is a set of classes and scripts for developers to create Java online and batch applications. Originally built to support mainframe Cobol migrated systems, it enables the development of systems with multiple resources for monitoring and control in the production environment.

SW-Eagle has several modules with features used by the development and production team:

  • Resources to develop Online and Batch applications
  • Specialized classes to access databases and conventional files
  • Graphic and textual reports
  • Scripts for executing batch classes
  • Common IDE usage
  • Database-based web application to monitor and interface with online, batch classes and batch scripts, in test and production environment.
  • Automatic log generation for all executed classes and scripts.
  • Environment scalable for running applications with use of specialized servers: database, online, batch and script.
  • Daemons for interact with servers, classes and scripts.
  • Message server for intersystem communications.

  • SW-Eagle framework has many features to make the development of online and batch java classes easier. The following sample sources show simple classes using the SW-Eagle framework and the execution logs generated.

    This is a batch class sample, showing texts "Class HelloWorld" and "HELLO WORLD!", extending SWBatch class from SW-Eagle.

    package test;
    import sw.SWBatch;
    public class HelloWorld extends SWBatch {
    	 public static void main(String argv[])  {
    		 HelloWorld exec = new HelloWorld();
    	public void process() {
    		DISPLAY("Class HelloWorld");

    The result of this execution is recorded in a log file automatically created by SW-Eagle, containing execution information such as the name of the basic class executed, execution PIDs, server where the class was executed, version of java used, version of the system Operational, start time and execution time, and any message generated by processing the class. Each execution of a batch class creates its own log.

    17/01/2017 13:04:39.681 (3761398) DEBUG SPECIFIED IN COMMAND LINE
    17/01/2017 13:04:39.701 (3761398) MYSELF PROGRAM TYPE=B
    17/01/2017 13:04:39.702 (3761398) BEGIN OF TASK 3761398/3761398/15876-HelloWorld
    17/01/2017 13:04:39.703 (3761398) PROGRAM TYPE IS BATCH
    17/01/2017 13:04:39.704 (3761398) HOSTNAME  =HM7
    17/01/2017 13:04:39.704 (3761398) USERCODE  =test
    17/01/2017 13:04:39.705 (3761398) OSUSER    =test
    17/01/2017 13:04:39.706 (3761398) RUN IN DEBUG MODE 1
    17/01/2017 13:04:39.707 (3761398) FRAMEWORK VERSION IS 8.5.1
    17/01/2017 13:04:39.709 (3761398) REVISION VERSION IS $Revision: 68 $
    17/01/2017 13:04:39.711 (3761398) CURRENT DIR IS P:\projeto1\testeLinc
    17/01/2017 13:04:39.714 (3761398) PROGRAM VERSION IS 0.76.1
    17/01/2017 13:04:39.717 (3761398) SYSTEM ARCHITECTURE IS amd64
    17/01/2017 13:04:39.718 (3761398) OS NAME IS Windows 10
    17/01/2017 13:04:39.719 (3761398) OS VERSION IS 10.0
    17/01/2017 13:04:39.720 (3761398) JAVA RUNTIME VERSION IS 1.8.0_101-b13
    17/01/2017 13:04:39.721 (3761398) JAVA VM VERSION IS 25.101-b13
    17/01/2017 13:04:39.722 (3761398) JAVA VENDOR IS Oracle Corporation
    17/01/2017 13:04:39.722 (3761398) 
    17/01/2017 13:04:39.733 (3761398) Class HelloWorld
    17/01/2017 13:04:39.733 (3761398) HELLO WORLD!
    17/01/2017 13:04:39.787 (3761398) 
    17/01/2017 13:04:39.833 (3761398) USER PROC TIME  =0:00:00.046
    17/01/2017 13:04:39.836 (3761398) SYSTEM PROC TIME=0:00:00.075
    17/01/2017 13:04:39.841 (3761398) EXECUTION TIME  =0:00:00.172
    17/01/2017 13:04:39.843 (3761398) TASKVALUE       =0
    17/01/2017 13:04:39.844 (3761398) TASKSTRING      =
    17/01/2017 13:04:39.853 (3761398) END OF TASK HelloWorld

    Online project transactions are developed using JSP page, interface class, and business rule classes. SW-Eagle has a container called SWManager, which is responsible for redirect of incoming messages, working with a queuing and copy of classes. An example of an online class, which is defined as a POJO, is shown below. It receives information in the USERNAME field in the JSP, and if the content is spaces, it returns an error message. The error message field, for example, is one of the several SW-Eagle built-in features and can be positioned anywhere on the JSP page. As in batch classes, an execution log is created for each online class, containing information generated during processing and execution statistics at the end.

    package test;
    import sw.SWOnline;
    import test.screen.S_OnlineTrans1;
    public class OnlineTrans1 extends SWOnline {
    	private static final long serialVersionUID = 1L;
    	public OnlineTrans1() {
    	S_OnlineTrans1 scr = new S_OnlineTrans1();
    	//The process method is called every time a transaction is received by SWManager. 
    	//When the last command in process() is executed, SWManager resume its process and sends the result page back to user 
    	public void process() {
    		//All field contents on the JSP page are available in screen class(S_OnlineTrans1)
    		if ( scr.USERNAME.EQ("") ) {
    			//This text will be shown on SW_MESSAGE field at JSP page

    The basic online environment diagram is shown above. SWManager is responsible for identifying the received message, from browsers or other servers, and redirect the transaction to a corresponding class queue. This approach makes the JVM's memory usage stable, with no ups and downs, and avoid Java Heap Space situations.

    The following image shows how servers can be configured. Specialized servers allow scalability and good response time for online and batch classes.

    An overview of SW-Eagle framework can be found in the following document.

    SW-Eagle Framework - Overview

Copyright 2017 SW Infor