Redvers COBOL JSON Interface
The Redvers COBOL JSON Interface gives COBOL applications fast, efficient access to JSON objects and Java applications. This off-the-shelf software is written in pure COBOL and simply requires the coding of a COBOL record layout and CALL statement to generate or parse any JSON object.
- Runs on all COBOL platforms
- Distributed in COBOL source code ("cloaked")
- Generates and parses multiple dimension arrays (nested OCCURS)
- Easy maintenance
- Fast, efficient, professional and fully scalable
- No training needed for COBOL programmers
- Runs in batch or on-line
- Free 30 day trial
The Redvers COBOL JSON Interface operates at record level, intelligently building all necessary JSON object structures when generating and correctly interpreting object structures when parsing. This approach replaces complex object level application logic with a single CALL statement that passes the next logical record to/from the application.
Our interfaces are currently used by customers all over the world, running on iSeries/AS400, UNIX, HP, Linux, Fujitsu BS2000, Micro Focus and IBM mainframe platforms.
How it Works
Before a COBOL application generates or parses JSON, a COBOL Record Definition (CRD) is coded, consisting of a working storage field definition for each JSON object. The CRD is then placed in the standard copybook library and a COPY/INCLUDE statement is added to the application code.
The CRD source code is also stored in the calling application so it can be passed to the interface routines in the CALL. This can either be done by coding the source into working storage or by reading the source from the copybook library at run time.
To generate JSON, the COBOL application populates the CRD and passes it to the generation subroutine (RCJSNGEN) with the CRD source in a CALL statement. RCJSNGEN then converts the COBOL data to JSON objects and returns the top level JSON object to the application.
To parse JSON, the application passes the JSON object and CRD source to the parser subroutine (RCJSNPAR) which returns the COBOL data in the CRD fields.
The generation process is illustrated below:
Parsing is achieved in a similar way to the above, except the application passes the JSON object to RCJSNPAR which returns the COBOL data in the CRD.
The Redvers COBOL JSON Interface 2.1 programs are sold in COBOL source code form and are installed by copying to the site source code library and running the standard COBOL compiler. Compilation at client sites enables installation on multiple platforms and it ensures complete compatibility with all other COBOL applications on the platform.
Using source code also allows our customers to make changes to certain values that would otherwise remain fixed. These values are known as User Maintained Variables (UMV's) and they can be tuned to reduce storage requirements or to generate JSON in specific formats. Full details on all UMV's can be found in the product user guides.
In order to protect both clients and authors from unauthorized code changes, the subroutine source code has been "cloaked" using the Redvers Cloaking Device. This process makes no logical difference to the code but renders it unintelligible to humans.
The COBOL Record Definition (CRD) can be coded to generate or parse any JSON object. Very large objects are generated/parsed using multiple calls to the interface so that machine storage is kept to a minimum.
Parsed objects are checked for syntax errors. In the event of an error, a message is returned, identifying the erroneous character position within the input string. No schema validation is performed.
JSON generation rate is 9.6 megabytes per second; parsing rate is 8.8 megabytes per second. All benchmark timings are based on an IBM zSeries mainframe running z/OS 1.10. Maximum on-line object size is 99 megabytes; there is no maximum object size for batch applications.
An example of JSON produced by the Redvers COBOL JSON Interface:
|Download the COBOL source code that created this JSON object:|