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.

Note: z/OS Connect supports JSON integer values in the range -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. Unsigned long long is not supported.
  • For COBOL, do not exceed PIC S9(18) COMP-5 or PIC 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 A launch icon to indicate a link opens a new tab or window. 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.

Note: If you are generating a WSBind file and JSON schemas to use the z/OS Connect data transformation feature, you must use the naming convention that is required by the 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 zosConnectService element when you configure server.xml file to use the DataXform.
  • {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.
For example:

        <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 A launch icon to indicate a link opens a new tab or window. DFHLS2JS reference documentation in the CICS Transaction Server for z/OS documentation, where the documentation refers to DFHLS2JS, use BAQLS2JS.

Two additional input parameters can be used to create a service archive for z/OS Connect zosConnect-2.0:
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.

Read syntax diagramSkip visual syntax diagramPDSLIB= valuePDSCP= valueREQMEM= valueRESPMEM= valueREQUEST-CHANNEL= valueRESPONSE-CHANNEL= valueLANG=COBOLLANG=PLI-ENTERPRISELANG=PLI-OTHERLANG=CLANG=CPPSTRUCTURE=(DFHREQUESTrequest,DFHRESPONSEresponse) PGMNAME= valueTRANSACTION= nameUSERID= id URI= value PGMINT=CHANNELCONTID= valuePGMINT=COMMAREA MAPPING-LEVEL=1.0MAPPING-LEVEL=1.1MAPPING-LEVEL=1.2See mapping level 1.2 and higherMAPPING-LEVEL=2.0MAPPING-LEVEL=2.1See mapping level 2.1 and higherMAPPING-LEVEL=2.2MAPPING-LEVEL=3.0See mapping level 3.0 and higherMAPPING-LEVEL=4.0See mapping level 4.0 and higherMAPPING-LEVEL=4.1See mapping level 4.1 and higherMAPPING-LEVEL=4.2MAPPING-LEVEL=4.3DATA-SCREENING=ENABLEDDATA-SCREENING=DISABLEDMINIMUM-RUNTIME-LEVEL=MINIMUMMINIMUM-RUNTIME-LEVEL=CURRENTMINIMUM-RUNTIME-LEVEL=1.0MINIMUM-RUNTIME-LEVEL=1.1MINIMUM-RUNTIME-LEVEL=1.2MINIMUM-RUNTIME-LEVEL=2.0MINIMUM-RUNTIME-LEVEL=2.1MINIMUM-RUNTIME-LEVEL=2.2MINIMUM-RUNTIME-LEVEL=3.0MINIMUM-RUNTIME-LEVEL=4.0MINIMUM-RUNTIME-LEVEL=4.1MINIMUM-RUNTIME-LEVEL=4.2MINIMUM-RUNTIME-LEVEL=4.3
Read syntax diagramSkip visual syntax diagramCCSID= valueWSBIND= valueJSON-SCHEMA-CODEPAGE=LOCALJSON-SCHEMA-CODEPAGE=UTF-8JSON-SCHEMA-CODEPAGE=EBCDIC-CP-USJSON-SCHEMA-REQUEST= valueJSON-SCHEMA-RESPONSE= valueLOGFILE= value
Mapping level 1.2 and higher
Read syntax diagramSkip visual syntax diagramCHAR-VARYING=NOCHAR-VARYING=NULL
Mapping level 2.1 and higher
Read syntax diagramSkip visual syntax diagramCHAR-VARYING=NOCHAR-VARYING=NULLCHAR-VARYING=COLLAPSECHAR-VARYING=BINARY
Mapping level 3.0 and higher
Read syntax diagramSkip visual syntax diagramDATETIME=UNUSEDDATETIME=PACKED15DATA-TRUNCATION=DISABLEDDATA-TRUNCATION=ENABLED
Mapping level 4.0 and higher
Read syntax diagramSkip visual syntax diagramCHAR-OCCURS=STRINGCHAR-OCCURS=ARRAYCHAR-USAGE=NATIONALCHAR-USAGE=DBCS
Mapping level 4.1 and higher
Read syntax diagramSkip visual syntax diagramTRUNCATE-NULL-ARRAYS=DISABLEDTRUNCATE-NULL-ARRAYS=ENABLEDTRUNCATE-NULL-ARRAY-VALUES=,NULLPACKEDZEROSPACEZERO
The following is sample JCL to run the BAQLS2JS tool. You can find this sample in the <hlq>.SBAQSAMP partitioned dataset.

//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.

Note:
  1. If you use the WSBind file to call CICS via an API, JSON-SCHEMA-REQUEST and JSON-SCHEMA-RESPONSE must use schemas that specify only a single property at the top level of the JSON format described.
  2. 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 zosConnectDataXform element in the server.xml file. Specify the following values for the BAQJS2LS parameters:
    
    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 zosConnectService element when you configure server.xml file to use the DataXform
    • {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.

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 A launch icon to indicate a link opens a new tab or window. DFHJS2LS reference documentation. Where the documentation refers to DFHJS2LS, use BAQJS2LS.

Two additional input parameters can be used to create a service archive for z/OS Connect:
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.

Read syntax diagramSkip visual syntax diagramPDSLIB= valuePDSCP= valueREQMEM( data-value)RESPMEM( data-value)LANG=COBOLLANG=PLI-ENTERPRISELANG=PLI-OTHERLANG=CLANG=CPPSTRUCTURE=(request,response)PGMNAME= valueURI= valuePGMINT=CHANNELCONTID= valuePGMINT=COMMAREATRANSACTION= nameUSERID= idMAPPING-LEVEL=1.0MAPPING-LEVEL=1.1MAPPING-LEVEL=1.2Advanced data mapping (mapping level 1.2 and higher)MAPPING-LEVEL=2.0MAPPING-LEVEL=2.1Advanced data mapping (mapping level 2.1 and higher)MAPPING-LEVEL=2.2Advanced data mapping (mapping level 2.2 and higher)MAPPING-LEVEL=3.0DATETIME=PACKED15DATETIME=STRINGDATA-TRUNCATION=DISABLEDDATA-TRUNCATION=ENABLEDMAPPING-LEVEL=4.0Advanced data mapping (mapping level 4.0 and higher)MAPPING-LEVEL=4.1Advanced data mapping (mapping level 4.1 and higher)MAPPING-LEVEL=4.2Advanced data mapping (mapping level 4.2 and higher)MAPPING-LEVEL=4.3Advanced data mapping (mapping level 4.3 and higher)MAPPING-OVERRIDES=SAME-AS-MAPPING-LEVELHYPHENS-AS-UNDERSCORESINTEGER-AS-PIC9LESS-DUP-NAMESUNDERSCORES-AS-HYPHENSMINIMUM-RUNTIME-LEVEL=MINIMUMMINIMUM-RUNTIME-LEVEL=1.0MINIMUM-RUNTIME-LEVEL=1.1MINIMUM-RUNTIME-LEVEL=1.2MINIMUM-RUNTIME-LEVEL=2.0MINIMUM-RUNTIME-LEVEL=2.1Advanced data mapping (runtime level 2.1 and higher)MINIMUM-RUNTIME-LEVEL=2.2Advanced data mapping (runtime level 2.2 and higher)MINIMUM-RUNTIME-LEVEL=3.0Advanced data mapping (runtime level 3.0 and higher)MINIMUM-RUNTIME-LEVEL=4.0Advanced data mapping (runtime level 4.0 and higher)MINIMUM-RUNTIME-LEVEL=4.1Advanced data mapping (runtime level 4.1 and higher)MINIMUM-RUNTIME-LEVEL=4.2Advanced data mapping (runtime level 4.2 and higher)MINIMUM-RUNTIME-LEVEL=4.3Advanced data mapping (runtime level 4.3 and higher)MINIMUM-RUNTIME-LEVEL=CURRENTJSON-SCHEMA-REQUEST= valueJSON-SCHEMA-RESPONSE= valueCCSID= valueDATA-SCREENING=ENABLEDDATA-SCREENING=DISABLEDDEFAULT-ARRAY-MAXITEMS= valueNAME-TRUNCATION= valueLOGFILE= valueWSBIND= valueWIDE-COMP3=FULLWIDE-COMP3= NOWIDE-COMP3= YESCHAR-WHITESPACE=PRESERVECHAR-WHITESPACE=REPLACECHAR-WHITESPACE=COLLAPSE
Advanced data mapping (mapping level 1.2 and higher)
Read syntax diagramSkip visual syntax diagramCHAR-VARYING=NOCHAR-VARYING=NULLCHAR-VARYING=YESCHAR-VARYING-LIMIT=32767CHAR-VARYING-LIMIT= valueCHAR-MULTIPLIER=1CHAR-MULTIPLIER= valueDEFAULT-CHAR-MAXLENGTH=255DEFAULT-CHAR-MAXLENGTH= valueDEFAULT-FRACTION-DIGITS=3DEFAULT-FRACTION-DIGITS= value
Advanced data mapping (mapping level 2.1 and higher)
Read syntax diagramSkip visual syntax diagramINLINE-MAXOCCURS-LIMIT=1INLINE-MAXOCCURS-LIMIT= value
Advanced data mapping (mapping level 4.2 and higher)
Read syntax diagramSkip visual syntax diagramADDITIONAL-PROPERTIES-DEFAULT=FALSEADDITIONAL-PROPERTIES-DEFAULT=TRUEADDITIONAL-PROPERTIES-MAX=UNBOUNDEDADDITIONAL-PROPERTIES-MAX= valueADDITIONAL-PROPERTIES-SIZE=255ADDITIONAL-PROPERTIES-SIZE= value
Use this sample JCL to run the BAQJS2LS tool. You can find this sample in the <hlq>.SBAQSAMP partitioned dataset.

//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.