GithubHelp home page GithubHelp logo

5l1v3r1 / opensource-cobol-devel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from opensourcecobol/opensource-cobol-devel

0.0 1.0 0.0 9 KB

opensource COBOL SMAPLES with Open COBOL ESQL on docker-compose

License: Apache License 2.0

COBOL 100.00%

opensource-cobol-devel's Introduction

OCCompose

opensource COBOL SMAPLES with Open COBOL ESQL on docker-compose

overview

If you have docker compose's environment, you can try this sample right away. In this sample, you can experience the collaboration between COBOL and PostgreSQL using opensource COBOL and Open COBOL ESQL.

Try this

  • Get project from github.
git clone https://github.com/opensourcecobol/opensource-cobol-devel.git
cd opensource-cobol-devel/
  • Run container images.
docker-compose up -d
  • Create DB on postgresql server.
docker-compose exec db createdb -U postgres testdb
  • Enter the oscobol container, compile and run COBOL Application.
docker-compose exec oscobol /bin/bash
ocesql src/INSERTTBL.cbl INSERTTBL.pre
cobc -locesql INSERTTBL.pre
ocesql src/FETCHTBL.cbl FETCHTBL.pre
cobc -locesql FETCHTBL.pre
  • Test data is Inserted and fetched.
[root@e8ccda101772 oscobol]# cobcrun INSERTTBL
*** INSERTTBL STARTED ***
NOTICE:  table "emp" does not exist, skipping
*** INSERTTBL FINISHED ***
[root@e8ccda101772 oscobol]# cobcrun FETCHTBL
*** FETCHTBL STARTED ***
TOTAL RECORD: 0012
---- -------------------- ------
NO   NAME                 SALARY
---- -------------------- ------
0001 HOKKAI TARO             400
0002 AOMORI JIRO             350
0003 AKITA SABURO            300
0004 IWATE SHIRO            -250
0005 MIYAGI GORO            -200
0006 FUKUSHIMA RIKURO        150
0007 TOCHIGI SHICHIRO       -100
0008 IBARAKI HACHIRO          50
0009 GUMMA KURO             -200
0010 SAITAMA JURO            350
0046 KAGOSHIMA ROKURO       -320
0047 OKINAWA SHICHIRO        480
*** FETCHTBL FINISHED ***

Copyright 2019, Tokyo System House Co., Ltd. [email protected]

opensource-cobol-devel's People

Contributors

n-isaka avatar n-izawa avatar ytr-sakamoto avatar

Watchers

 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.