cobol.run

April 30, 2017 ยท View on GitHub

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

fieldtypedescriptionrequired
sourceStringthe COBOL source to compile and runyes
filesArray (File)List of files required by the cobol programno
argsArray (String)List of arguments to pass into the cobol program at runtimeno
optionsObjectList of custom gnucobol compiler flagsno

File

The files array contains File objects.

fieldtypedescriptionrequired
nameStringName of the fileyes
dataStringContents of the fileyes

options.dialect

Supported COBOL dialects

dialectdescription
cobol2014Cobol 2014 Dialect
cobol2002Cobol 2002 Dialect
cobol85Cobol 85 Dialect
ibmIBM Dialect
mvsMVS Dialect
bs2000BS2000 Dialect
mfMicroFocus Dialect
acuACUCOBOL Dialect

Resources

License

MIT

Maintained By