Use COBOL to parse JSON

This simple COBOL application demonstrates how to parse JSON using IBM Enterprise COBOL. It is written to work in a standalone fashion so it can run without any input files. The JSON string is declared in memory, as are the results from the parse, and everything is printed out for clarity.
The first JSON text that you will need to parse contains information about the client and is defined in working storage as jtxt-1047-client-data.
It looks like this:

The second JSON text that you’ll use contains transaction data stored in a JSON array. You’ll define it in working storage as jtxt-1047-transactions.
It looks like this:

Prerequisites
z/OS system access
IBM Enterprise COBOL
Estimated time
It should take about 30 minutes to complete this tutorial.
Steps
1. Copy the supplied files to your z/OS system
Copy files in this GitHub repo to your z/OS system. There are several ways to transfer the files: You could do this directly to z/OS using a Git


Original URL: https://developer.ibm.com/tutorials/parse-json-using-ibm-enterprise-cobol/

Original article

Comments are closed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑

%d bloggers like this: