Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Welcome

Welcome to the

Quick Web-Based Interactive COBOL Service (QWICS),

an environment to execute transactional COBOL programs written for traditional mainframe transaction processing monitors (TPM) without these as part of any Java EE-compliant application server.

Copyright (C) 2018 by Philipp Brune Email: Philipp.Brune@qwics.org

QWICS is free software, licensed either under the terms of the GNU General Public License or the GNU Lesser General Public License (see respective source files for details), both as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. You should have received a copy of both licenses along with this project. If not, see http://www.gnu.org/licenses/.

DISCLAIMER:

It 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 license for more details.

PRE-REQUISITES:

This software has been written and tested under Linux (for S390/z Systems mainframes and x86)!

  1. Download and extract a copy of the GnuCOBOL sources in its newest release. Modify the following lines the in the file termio.c in the subdirectory libcob/ (preferably, search for the beginning of the function cob_display(...) and modify and extend it accordingly):
int (*performEXEC)(char*, void*) = NULL;

void display_cobfield(cob_field *f, FILE *fp) {
    display_common(f,fp);
}


void
cob_display (const int to_stderr,
   const int newline, const int varcnt, 
   ...)
{
        FILE            *fp;
        cob_field       *f;
        int             i;
        int             nlattr;
        cob_u32_t       disp_redirect;
        va_list         args;

// BEGIN OF EXEC HANDLER
        va_start (args, varcnt);
        f = va_arg (args, cob_field * );
        if (strstr((char*)f->data,
        			    "TPMI:")) {
           char *cmd 
                = (char*)(f->data+5);
            if (varcnt > 1) {
                f = va_arg (args, 
                      cob_field * );
            }
           (*performEXEC)(cmd,(void*)f);
           va_end (args);
           return;
         }
         va_end (args);
// END OF EXEC HANDLER
  1. Afterwards, build and install GnuCOBOL according to its documentation.

  2. Download and install a copy of PostgreSQL database including its C client lib

INSTALLATION:

Build the preprocessors and the QWICS COBOL execution runtime:

  1. Adjust the paths in the following Makefiles to fit your installation:
  • /Makefile
  • /src/preps/maps/Makefile
  • /src/preps/cobol/Makefile
  1. Build the binaries, in type the following commands:
make tpmserver
cd src/preps/maps
make
cd ../cobol
make
  1. The Java sources of the QWICS JDBC driver and the demo Java EE Web App are provided as Eclipse IDE projects in the subdirectory workspace. Please import the projects in your own workspace (using menu items "Import... --> Existing projects into workspace"). Please see http://www.eclipse.org for further information on Eclipse.

  2. Download a Java EE-compliant application server and (e.g. JBoss WildFly, see http://wildfly.org) and deploy the JDBC driver with a XA datasource and the Web appliaction there.

USING QWICS

  1. Deploy your COBOL source files in subdirectory /cobsrc, copy your mapset defs in /maps
cd maps
../bin/mapprep <MAPFILE>

cd ../cobsrc
../bin/cobp <COBOLMODULENAME>  # without .cob or .cbl suffix!
  1. Start the PostgreSQL server according to its docs
  2. Start the QWICS COBOL runtime, in type the following commands:
cd bin
/tpmserver 8000
  1. Start the Java EE application server and use your COBOL code in your EJBs (see example)

Have fun!

About

No description, website, or topics provided.

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.