Conversion for z/OS Connect data transformation
The z/OS® Connect feature runs in a WebSphere® Application Server for z/OS, Liberty environment. You can use the BBGLS2JS and BBGJS2LS Job Control Language (JCL) tools to generate the necessary z/OS Connect artifacts to facilitate data conversion.
BBGLS2JS: High-level language to binding and schema file conversion for z/OS Connect data transformation
The BBGLS2JS Job Control Language procedure generates a JavaScript Object Notation (JSON) schema and binding files from a high-level data structure. The files that are generated are used by the z/OS Connect data transformation process. It is based on DFHLS2JS from the Customer Information Control Center (CICS®) Transaction Server Mobile Extensions feature pack.
See the documentation for usage information and examples on using the BBGLS2JS tool. Where the documentation refers to DFHLS2JS, use BBGLS2JS. https://www.ibm.com/support/knowledgecenter/SSGMCP_5.1.0/com.ibm.cics.ts51.home.doc/library/library_pdf_collections.html
The following symbolic parameters are defined in BBGLS2JS:
WLPDIR=path A required parameter that specifies the name of the WebSphere Application Server Liberty directory in the UNIX System Services file system.
TMPDIR=tmpdir Specifies the location of a directory in IBM® z/OS Unix System Services that BBGLS2JS uses as a temporary workspace. The user ID used to run the job must have read and write permission to this directory. It is an optional parameter and if it is not specified, the default value is /tmp.
You specify an absolute path for a Java API to use a new temporary workspace when you code the java.io.tmpdir custom property. For scripts, you specify the environment variable TMPDIR to point to this new temporary directory.
TMPFILE=tmpprefix Specifies a prefix that BBGLS2JS uses to construct the names of the temporary workspace files. It is an optional parameter and if it is not specified, the default value is LS2JS.
The input parameters that are documented for DFHLS2JS are also applicable to BBGLS2JS. The value that is specified for the PGMNAME parameter is used in the generated JSON schema.
The following example shows how to create the JCL to run the BBGLS2JS tool:
//LS2JS JOB 'accounting information',name,MSGCLASS=A
//JCLLIB JCLLIB ORDER=EXAMPLE.DSNAME
//JAVAPROG EXEC BBGLS2JS,
// WLPDIR='/opt/IBM/wlp'
//INPUT.SYSUT1 DD *
PDSLIB=TEST.DSNAME
REQMEM=CDATA2
RESPMEM=CDATA2
MAPPING-LEVEL=3.0
MINIMUM-RUNTIME-LEVEL=3.0
CHAR-VARYING=COLLAPSE
STRUCTURE=(requestData,requestData)
JSON-SCHEMA-REQUEST=/u/user1/json/getcustc_request.json
JSON-SCHEMA-RESPONSE=/u/user1/json/getcustc_response.json
LANG=C
LOGFILE=/u/user1/wsbind/getcustc.log
URI=http://myserver.example.org:8080/exampleApp/example
PGMINT=COMMAREA
PGMNAME=GETCUSTC
WSBIND=/u/user1/getcustc.wsbind
/*
BBGJS2LS: JSON schema to high-level language conversion for z/OS Connect data transformation
The BBGJS2LS JCL procedure generates a high-level language data structure and binding file from a JSON schema. The files that are generated are used by the z/OS Connect data transformation process. It is based on DFHJS2LS from the CICS Transaction Server Mobile Extensions feature pack.
See the documentation for usage information and examples on using the BBGJS2LS tool. Where the documentation refers to DFHJS2LS, use BBGJS2LS. https://www.ibm.com/support/knowledgecenter/SSGMCP_5.1.0/com.ibm.cics.ts51.home.doc/library/library_pdf_collections.html
The following symbolic parameters are defined in BBGJS2LS:
WLPDIR=path A required parameter that specifies the name of the WebSphere Application Server Liberty directory in the UNIX System Services file system.
TMPDIR=tmpdir Specifies the location of a directory in z/OS UNIX that BBGJS2LS uses as a temporary workspace. The user ID used to run the job must have read and write permission to this directory. It is an optional parameter and if it is not specified, the default value is /tmp.
TMPFILE=tmpprefix Specifies a prefix that BBGJS2LS uses to construct the names of the temporary workspace files. It is an optional parameter and if it is not specified, the default value is JS2JS.
The input parameters that are documented for DFHJS2LS are also applicable to BBGJS2LS. The value that is specified for the PGMNAME parameter is used in the name of the generated high-level language structure.
The following example shows how to create the JCL to run the BBGJS2LS tool:
//JS2LS JOB 'accounting information',name,MSGCLASS=A
// SET QT=''''
//JCLLIB JCLLIB ORDER= EXAMPLE.DSNAME
//JAVAPROG EXEC BBGJS2LS,
// WLPDIR='/opt/IBM/wlp'
//INPUT.SYSUT1 DD *
PDSLIB=TEST.DSNAME
REQMEM=CPYBK1
RESPMEM=CPYBK2
JSON-SCHEMA-REQUEST=example.json
JSON-SCHEMA-RESPONSE=example.json
LANG=COBOL
LOGFILE=/u/exampleapp/wsbind/example.log
MAPPING-LEVEL=3.0
CHAR-VARYING=NULL
INLINE-MAXOCCURS-LIMIT=2
PGMNAME=DFH0XCMN
URI=exampleApp/example
PGMINT=COMMAREA
SYNCONRETURN=YES
WSBIND=/u/exampleapp/wsbind/example.wsbind
/*