Generating mappings from language structure
To create JavaScript Object Notation (JSON) from application data or application data from JSON, you create the mappings to describe how CICS® should transform the data and JSON at run time. You can start from any application data record; for example, you can start with a COMMAREA, VSAM file, temporary storage queue, or an IBM® DB2® record.
Before you begin
- You must have a language structure that describes the application record in a partitioned data set. The language structure can be written in any of the high-level languages that are supported by the CICS JSON assistant: COBOL, PL/I, C, and C++.
- You must configure the user ID under which DFHLS2JS runs to use z/OS® UNIX.
- The user ID must have read permission to access the language structure and write permission to put the output in the appropriate directories on z/OS UNIX.
- You must allocate sufficient storage to the user ID for the ID to run Java™ . You can use any supported version of Java.
About this task
Procedure
Run the DFHLS2JS batch job. DFHLS2JS has optional parameters that you select to meet your requirements, such as selecting a particular code page. Use the following parameters as a minimum:
Results
The following example
shows DFHLS2JS with the minimum set of parameters specified.
//LS2JS JOB 'accounting information',name,MSGCLASS=A
// SET QT=''''
//JCLLIB JCLLIB ORDER=FPHLQ.SDFHMOBI
//JAVAPROG EXEC DFHLS2JS,
//INPUT.SYSUT1 DD *
LANG=COBOL
BUNDLE=/u/exampleapp/bundle/test1
LOGFILE=/u/exampleapp/jsbind/example.log
MAPPING-LEVEL=3.0
PDSLIB=//CICSHLQ.SDFHSAMP
PDSMEM=CPYBK2
JSONTRANSFRM=example.jsbind
JSON-SCHEMA=/u/exampleapp/example.json
/*