Conversion for IBM z/OS Connect zosConnect-2.0 data transformation
You can use the BAQLS2JS and BAQJS2LS utilities to generate the necessary IBM® z/OS® Connect zosConnect-2.0 artifacts to facilitate data conversion with the z/OS Connect zosConnect-2.0 data transformation provider. The BAQLS2JS and BAQJS2LS utilities are only supported by Java™ 8.
zosConnect-2.0 Applies to zosConnect-2.0.
The BAQLS2JS and BAQJS2LS utilities are provided for use with the supplied service provider for CICS® WOLA.
-2ˆ63 through 2ˆ63 - 1. Any language structures that you use as
input to the BAQLS2JS utility, which generates JSON schemas with "type":"integer"
and values less than -2ˆ63 or values higher than 2ˆ63 - 1 are not
supported. For example,- For C, do not exceed
long long. Unsignedlong longis not supported. - For COBOL, do not exceed
PIC S9(18) COMP-5orPIC S9(18) DISPLAY. - For Enterprise PL/I, do not exceed
SIGNED FIXED BINARY(63).UNSIGNED FIXED BINARY(64)is not supported.
If you are using existing JSON schemas as input to BAQJS2LS, ensure that any integer values do not exceed these limits.
For more information about the language structure to JSON mappings
and JSON to language structure mappings, see
High-level language and JSON schema mapping in the CICS
Transaction Server for z/OS documentation.
BAQLS2JS: High-level language to binding and schema file conversion for z/OS Connect zosConnect-2.0 data transformation
The BAQLS2JS Job Control Language procedure generates a JavaScript Object Notation (JSON) schema and bind files from a high-level data structure. The files that are generated are used by the z/OS Connect zosConnect-2.0 data transformation process.
zosConnectDataXform element in the
server.xml file. The names of the request and response schemas must be of the
format that is shown in the following example. The suffixes _request and
_response are mandatory. The following example uses this naming
convention:
SERVICE-ARCHIVE={servicearchive_dir}/{servicearchive}
SERVICE-NAME={serviceName}
WSBIND={wsbind_dir}/{serviceName}.wsbind
JSON-SCHEMA-REQUEST={json_schema_dir}/{serviceName}_request.json
JSON-SCHEMA-RESPONSE={json_schema_dir}/{serviceName}_response.json
where - {serviceName} must match the value that is specified on the
serviceName attribute of the associated
zosConnectServiceelement when you configure server.xml file to use theDataXform. - {servicearchive_dir>} is the UNIX System Services directory in which the service archive file is created
- {wsbind_dir} is the UNIX System Services directory in which the wsbind file is created.
- {json_schema_dir} is the UNIX System Services directory in which the JSON request and response schemas are created.
<zosconnect_zosConnectService id="inquireCatalogService"
serviceName="<serviceName>"
serviceRef="wolaCatalogManager"
dataXformRef="xformJSON2Byte" />
<!-- z/OS Connect data transformation provider -->
<zosconnect_zosConnectDataXform id="xformJSON2Byte"
bindFileLoc="<wsbind_dir>"
bindFileSuffix=".wsbind"
requestSchemaLoc="<json_schema_dir>"
responseSchemaLoc="<json_schema_dir>"
requestSchemaSuffix=".json"
responseSchemaSuffix=".json">
</zosconnect_zosConnectDataXform>
Job control statements for BAQLS2JS
- JOB
- Starts the job.
- EXEC
- Specifies the procedure name (BPXBATCH).
Input Parameters
BAQLS2JS runs a version of the CICS
JSON assistant utility program DFHLS2JS. For more information, see
DFHLS2JS reference documentation in the
CICS Transaction Server for z/OS documentation, where the documentation refers to
DFHLS2JS, use BAQLS2JS.
- SERVICE-ARCHIVE
- The fully qualified z/OS UNIX name of the service archive file. DFHLS2JS creates the file, but not the directory structure, if it does not exist.
- SERVICE-NAME
- The name of the z/OS Connect zosConnect-2.0 service that is described by the service archive. This name is specified by the SERVICE-ARCHIVE parameter. If you develop APIs from the generated service archive files, the API toolkit uses the value that is specified on the SERVICE-NAME parameter as the service name associated with a specific API path and method.
The following input parameters are valid for BAQLS2JS. The value that is specified for the PGMNAME parameter is used in the generated JSON schema.
//BAQLS2JS JOB (0),MSGCLASS=X,CLASS=A,NOTIFY=&SYSUID,REGION=500M
//ASSIST EXEC PGM=BPXBATCH
//STDPARM DD *
PGM /usr/lpp/IBM/zosconnect/v3r0/bin/baqls2js
LOGFILE=/u/userid/BAQLS2JS.log
LANG=COBOL
MAPPING-LEVEL=4.0
PDSLIB=//PROJECT.COBOL
REQMEM=REQLS
RESPMEM=RESPLS
JSON-SCHEMA-REQUEST=/u/userid/schema/inquireCatalog_request.json
JSON-SCHEMA-RESPONSE=u/userid/schema/inquireCatalog_response.json
WSBIND=/u/userid/wsbind/inquireCatalog.wsbind
PGMNAME=DFH0XCMN
PGMINT=COMMAREA
/*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDENV DD *
JAVA_HOME=/java/java71_64
//BAQJS2LS: JSON schema to high-level language conversion for z/OS Connect zosConnect-2.0 data transformation
The BAQJS2LS 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.
The value that is specified for the PGMNAME parameter is used in the name of the generated high-level language structure.
- If you use the WSBind file to call CICS via an API,
JSON-SCHEMA-REQUESTandJSON-SCHEMA-RESPONSEmust use schemas that specify only a single property at the top level of the JSON format described. - If you are generating a WSBind file and JSON schemas for use in a z/OS Connect DataXform, you must use a naming convention
that is expected by the
zosConnectDataXformelement in the server.xml file. Specify the following values for the BAQJS2LS parameters:
whereSERVICE-NAME={serviceName} WSBIND={wsbind_dir}/{serviceName}.wsbind JSON-SCHEMA-REQUEST={json_schema_dir}/{serviceName}_request.json JSON-SCHEMA-RESPONSE={json_schema_dir}/{serviceName}_response.json- {serviceName} must match the value that is specified on the
serviceName attribute of the associated
zosConnectServiceelement when you configure server.xml file to use theDataXform - {wsbind_dir} is the UNIX System Services directory in which the wsbind file is created.
- {json_schema_dir} is the UNIX System Service directory in which the JSON request and response schemas are stored.
- {serviceName} must match the value that is specified on the
serviceName attribute of the associated
Job control statements for BAQJS2LS
- JOB
- Starts the job.
- EXEC
- Specifies the procedure name (BPXBATCH).
Input parameters for BAQJS2LS
BAQJS2LS runs a version of the CICS
JSON assistant utility program DFHJS2LS. For input parameter descriptions, see
the
DFHJS2LS reference documentation. Where the
documentation refers to DFHJS2LS, use BAQJS2LS.
- SERVICE-ARCHIVE
- The fully qualified z/OS UNIX name of the service archive file. DFHJS2LS creates the file, but not the directory structure, if it does not exist.
- SERVICE-NAME
- The name of the z/OS Connect service that is described by the service archive. This archive is specified by the SERVICE-ARCHIVE parameter. If you develop APIs from the generated service archive files, the API toolkit uses this value as the service name associated with a specific API path and method.
The following input parameters are valid for BAQJS2LS. The value that is specified for the PGMNAME parameter is used in the name of the generated high-level language structure.
//BAQJS2LS JOB (0),MSGCLASS=X,CLASS=A,NOTIFY=&SYSUID,REGION=500M
//ASSIST EXEC PGM=BPXBATCH
//STDPARM DD *
PGM /usr/lpp/IBM/zosconnect/v3r0/bin/baqjs2ls
LOGFILE=/u/userid/BAQJS2LS.log
LANG=COBOL
MAPPING-LEVEL=4.0
PDSLIB=//PROJECT.COBOL
REQMEM=REQLS
RESPMEM=RESPLS
JSON-SCHEMA-REQUEST=/u/userid/schema/inquireCatalog_request.json
JSON-SCHEMA-RESPONSE=u/userid/schema/inquireCatalog_response.json
WSBIND=/u/userid/wsbind/inquireCatalog.wsbind
PGMNAME=DFH0XCMN
PGMINT=COMMAREA
/*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDENV DD *
JAVA_HOME=/java/java71_64
//Return codes
If the running utility program issues a nonzero return code, look in the job STDOUT and STDERR for messages about the cause of the problem. If no warning or error messages are found in STDOUT or STDERR, look for security-related messages in the system log of the LPAR. Fix the problem and rerun the utility program until a zero return code is obtained. Do not use artifacts that are generated with a nonzero return code.
