GithubHelp home page GithubHelp logo

sans2010 / cb2java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from johnhearn/cb2java

0.0 1.0 0.0 344 KB

Dynamic COBOL copybook parser for Java. Supports parsing and writing of application data based on parsed copybooks. Coverts COBOL types to Java types and back to COBOL types with validation. (forked from https://sourceforge.net/projects/cb2java/)

License: Other

Java 98.70% Python 1.30%

cb2java's Introduction

The CB2Java project's goal is to simplify the lives of developers charged with writing Java applications that communicate with COBOL applications. The main motivation for writing this library was that in the limited number of available (free) libraries, none had been designed around a dynamic approach. While it may seem strange to write about dynamic approaches in Java as it is a statically typed, compiled language but it solves a lot of issues that arise in a enterprise environment where almost nothing stays the same for very long.

CB2Java is not a standalone tool for editing and viewing COBOL data.

With tools that require class generation (or worse, hand-coded classes) to parse data defined in COBOL copybooks, a lot of changes require regenerating and recompiling the code even when application logic does not change. For example, if an element in a copybook is defined as being a 6 digit integer, you will most likely end up using an int to represent that value in Java. If later that element is increased to 8 digits, your Java code is still correct. An int will still hold the value. But if you generated the code to parse the message, you need to regenerate the classes and recompile. Some readers might be thinking "that's great but it almost never happens because it would break other applications." This is true to some extent but often a secondary copybook is defined that differs only in one element. With CB2Java, one Java module can use two different copybooks by merely changing the copybook instance. With a generated approach, you need two sets of generated classes.

Copyright © 2006 James Watson

History

Initial fork of project https://sourceforge.net/projects/cb2java/ by dubwai (https://sourceforge.net/users/dubwai)

  • added LICENSE file
  • added LICENSE header to all sources

Forked again at https://github.com/devstopfix/cb2java

  • conversion into a self-contained Maven project (v1.0)
  • copied the classes required from http://cb2xml.sourceforge.net/
  • converted source code to Java 5 and added types to collections (v5.0)

Documentation

Build

Build the JAR file using Maven:

mvn install

Include the JAR file in your Java project pom.xml:

<dependency>
    <groupId>net.sf.cb2java</groupId>
    <artifactId>cb2java</artifactId>
    <version>5.3</version>
</dependency>

or your Leiningen project.clj:

[net.sf.cb2java/cb2java "5.3"]

Licence

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

cb2java's People

Contributors

devstopfix avatar montoyaedu avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.