morecobol / cobol.run

:floppy_disk: :rocket: Run serverless COBOL programs on OpenWhisk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cobol.run

Docker Repository Build status Follow @morecobol on Twitter

Run serverless COBOL programs on OpenWhisk. Built with Trails.js and Node.

Usage

The user sends a POST request containing COBOL source code, and receives as a response the result of the execution of the program.

Example

  • Request: POST /compileAndRun
    {
      "options": {
        "dialect": "cobol2014"
      },
      "source": "identification division. program-id. hello. procedure division. display \"hello world\"."
    }
  • Response:
    {
      "code": 0,
      "output": "hello world"
    }

API

POST payload

field type description required
source String the COBOL source to compile and run yes
files Array (File) List of files required by the cobol program no
args Array (String) List of arguments to pass into the cobol program at runtime no
options Object List of custom gnucobol compiler flags no

File

The files array contains File objects.

field type description required
name String Name of the file yes
data String Contents of the file yes

options.dialect

Supported COBOL dialects

dialect description
cobol2014 Cobol 2014 Dialect
cobol2002 Cobol 2002 Dialect
cobol85 Cobol 85 Dialect
ibm IBM Dialect
mvs MVS Dialect
bs2000 BS2000 Dialect
mf MicroFocus Dialect
acu ACUCOBOL Dialect

Resources

License

MIT

Maintained By

About

:floppy_disk: :rocket: Run serverless COBOL programs on OpenWhisk


Languages

Language:JavaScript 100.0%