TRANSFORM DATATOXML

Use the TRANSFORM DATATOXML command to convert application data to XML.

TRANSFORM DATATOXML

Read syntax diagramSkip visual syntax diagramTRANSFORM DATATOXMLCHANNEL( data-value)DATCONTAINER( data-value) ELEMNAME( data-area)ELEMNAMELEN( data-area) ELEMNS( data-area)ELEMNSLEN( data-area) TYPENAME( data-area)TYPENAMELEN( data-area)TYPENS( data-area)TYPENSLEN( data-area)XMLCONTAINER( data-value)XMLTRANSFORM( name)

Conditions: NOTFND, LENGERR, CHANNELERR, CONTAINERERR, INVREQ

This command is threadsafe.

Description

The TRANSFORM DATATOXML command transforms application data to XML using mappings that are defined in the XML binding. The XMLTRANSFORM resource defines where the XML binding and the XML schema are located.

Options

CHANNEL(data-value)
Specify the name of the channel used to pass the containers holding the XMLCONTAINER and DATCONTAINER 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 the channel name DFHTRANSACTION to use the transaction channel.
DATCONTAINER(data-value)
Specify the name of the container that contains the application data for conversion. This container must be present on the channel. 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.
CICS® reads from this container in BIT mode.
ELEMNAME(data-area)
Specify the name of an XML element. CICS returns the local name of the XML element that CICS generates.
ELEMNAMELEN(data-area)
Specify the fullword binary length of the XML element in the ELEMNAME option. The maximum value of ELEMSNAMELEN is 255.
ELEMNS(data-area)
Specify the namespace URI of the XML element that is returned in the ELEMNAME option.
ELEMNSLEN(data-area)
Specify the fullword binary length of the namespace in the ELEMNS option. The maximum value of ELEMNSLEN is 255.
TYPENAME(data-area)
Specify the xsi:type of the XML element that is returned in the ELEMNAME option.
TYPENAMELEN(data-area)
Specify the fullword binary length of the xsi:type that is returned in the TYPENAME option.
TYPENS(data-area)
Specify the namespace of the xsi:type attribute of the XML element that is returned in the ELEMNAME option.
TYPENSLEN(data-area)
Specify the fullword binary length of the namespace for the xsi:type attribute that is returned in the TYPENS option.
XMLCONTAINER(data-value)
Specify the name of the container that will contain the output XML once the command completes. 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.

You do not need to create the target container before issuing the command. The container is created and populated as part of the command itself. If the container does exist, and has been defined as a data type of BIT, it is deleted and redefined as type CHAR as part of the command.

XMLTRANSFORM(data-value)
Specify the name of the XMLTRANSFORM resource that CICS uses to transform the data to XML. The resource defines the XML binding and the XML schema. The name of the XMLTRANSFORM resource must be 32 characters. If the resource name is less than 32 characters, you must pad the value with blanks.

Conditions

13 NOTFND
RESP2 values:
1
The XMLTRANSFORM was not found.
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 XMLCONTAINER parameter was not found.
2
The container specified by the NSCONTAINER parameter was not found.
3
The container specified by the DATCONTAINER parameter was not found.
22 LENGERR
RESP2 values:
1
The data in the container specified by the DATCONTAINER parameter is too short for the specified transformation type.
2
The ELEMNAME buffer is too small.
3
The ELEMNS buffer is too small.
4
The TYPENAME buffer is too small.
5
The TYPENS buffer is too small.
6
The ELEMNAMELEN value exceeds the maximum value of 255.
7
The ELEMNSLEN value exceeds the maximum value of 255.
16 INVREQ
RESP2 values:
1
The XMLTRANSFORM resource is not enabled.
2
The XMLCONTAINER container is empty.
3
The XML input data is invalid. For more information, see the error message in the DFH-XML-ERRORMSG container.
4
The XML input data cannot be converted. For more information, see the error message in the DFH-XML-ERRORMSG container.
5
The application data is invalid. For more information, see the error message in the DFH-XML-ERRORMSG container.
6
The application data cannot be converted. For more information, see the error message in the DFH-XML-ERRORMSG container.
8
The application data container is not populated in BIT mode
9
The XMLTRANSFORM does not support the requested XML element.
10
The XMLTRANSFORM does not support the requested XML type.
11
There was a problem linking to a vendor-supplied transformer program.
13
The CHANNEL parameter was not supplied and is required.
14
The ELEMNAME parameter was not supplied and is required.
15
The ELEMNS parameter was not supplied and is required.
16
The DATCONTAINER parameter was not set and is required.
17
There is a runtime validation failure.
18
There is a container datatype error.
101
The user is not authorized to use the XMLTRANSFORM.