TRANSFORM JSONTODATA

Use the TRANSFORM JSONTODATA command to convert JSON to application data.

TRANSFORM JSONTODATA

Read syntax diagramSkip visual syntax diagramTRANSFORM JSONTODATACHANNEL( data-value)INCONTAINER( data-value)OUTCONTAINER( data-value)TRANSFORMER( name)

Conditions: CHANNELERR, CONTAINERERR, INVREQ, NOTFND

This command is threadsafe.

Description

The TRANSFORM JSONTODATA command transforms JSON to application data. The JSON transformer resource is a bundle that defines the location of the JSON binding and the JSON schema for transforming JSON to application data.

Options

CHANNEL(data-value)
Specify the name of the channel used to pass the containers that hold the OUTCONTAINER and INCONTAINER data. The name of the channel must be 16 characters in length. If the channel name is less than 16 characters, you must pad the data value with trailing blanks. You can specify DFHTRANSACTION to use the transaction channel.
INCONTAINER(data-value)
Specify the 16-byte name of the container that contains the JSON to be converted. This container must already exist and be populated in CHAR mode. If it is populated in BIT mode, CICS tries to determine the data encoding.
OUTCONTAINER(data-value)

Optionally specify the name of the output container to contain the converted data. The name of the container must be 16 characters in length. If the container name is less than 16 characters, you must pad the data value with trailing blanks. If this option is omitted, DFHJSON-DATA is used.

Do not create the target container before you issue the command because one container is created and populated as part of the command itself. If the container does exist, it is deleted before the transformation takes place. CICS populates this container in BIT mode.

TRANSFORMER(name)

Specify the 16-byte name of the JSON transformer resource bundle that CICS uses to transform the data to JSON. The resource defines the JSON binding and the JSON schema. The name of the JSON transformer resource must be 16 characters in length. If the resource name is less than 16 characters, you must pad the value with blanks.

Conditions

122 CHANNELERR
RESP2 values:
1
The channel specified by the CHANNEL parameter is incorrect.
2
The channel specified by the CHANNEL parameter was not found.
110 CONTAINERERR
RESP2 values:
1
The container specified by the INCONTAINER parameter was not found.
16 INVREQ
RESP2 values:
1
The JSON transformer bundle resource is not enabled.
4
The JSON data cannot be converted. For more information, see the error message in the DFHJSON-ERRORMSG container.
7
The INCONTAINER container is not populated in CHAR mode.
101
The user is not authorized to use the JSON transformer.
13 NOTFND
RESP2 values:
1
The JSON transformer bundle resource was not found.