The CICS JSON assistant

The CICS® JSON assistant is a set of batch utilities that can help you to transform JSON into application data and vice versa. The assistant supports rapid deployment of applications that perform JSON processing with the minimum amount of programming effort.

Use the CICS assistant to generate mappings between high-level language structures and JSON schemas. The CICS assistant also generates JSON schemas from high-level language data structures, or vice versa.

Using the JSON assistant for CICS reduces the amount of code that you must write to parse or construct JSON; CICS transforms data between JSON fragments and the data structure of an application program.

The JSON assistant can create a JSON schema from a simple language structure, or a language structure from an existing XML schema, and supports COBOL, C/C++, and PL/I. It also generates metadata that CICS uses at run time to automatically convert XML data to binary application data or vice versa; the metadata is defined in an XML binding and stored on z/OS® UNIX. The schema for the XML binding is in /usr/lpp/cicsts/cicsts52/schemas/xmltransform/ directory on z/OS UNIX.

Utility programs DFHJS2LS and DFHLS2JS are collectively known as the CICS JSON assistant:
DFHLS2JS
DFHLS2JS maps high-level language structures to JSON schemas.
DFHJS2LS
DFHJS2LS maps JSON schemas to high-level language structures.
The JCL procedures to run both programs are in the hlq.XDFHINST library, where hlq is the high-level qualifier of your CICS installation.
The two mappings are not symmetrical:
  • If you process a language data structure with DFHLS2JS, and then process the resulting JSON schema with the DFHJS2LS, do not expect the final data structure to be the same as the original.
  • If you process a JSON schema with DFHJS2LS, and then process the resulting language structure with the DFHLS2JS, do not expect the final JSON schema to be the same as the original.
  • In some cases, DFHJS2LS generates language structures that are not supported by DFHLS2JS.

You must code high-level language structures that are processed by DFHLS2JS according to the rules of the language, as implemented in the language compilers that CICS supports.