DFHATOMCONTENT container

DFHATOMCONTENT is a container of DATATYPE(CHAR) that you use for your service routine to provide the content for an Atom entry.

This container is required. CICS returns the data in the container as the <atom:content> element for the Atom entry.

If you are using the resource handling parameters in the DFHATOMPARMS container, the ATMP_CONTENT_FLD parameter has the name and length of the field in your resource record that holds the data for this container. You can use data from a single field or from a structure of nested fields. If you are not using the resource handling parameters, you can code your service routine either to return the whole of the resource record as the content for the entry, or to select appropriate fields from the resource record to assemble the content.

You can supply your content as plain text with no child elements, or you can use XML or another type of markup, such as HTML or XHTML, to format your data. The ATMP_MTYPEOUT parameter in the DFHATOMPARMS container contains the media type for the expected content of the Atom entry, as specified in the type attribute of the <atom:content> element in the Atom configuration file for the Atom feed. As in RFC 4287, the media type "text" is used for plain text instead of the IANA media type "text/plain", "html" is used instead of "text/html", and "xhtml" is used instead of "application/xhtml+xml". If you do not specify a media type in the Atom configuration file, CICS supplies a default media type of "application/xml" in this parameter.

You can also store media types for individual Atom entries in your resource records. If you are using the resource handling parameters, the ATMP_CONTENT_TYPE_FLD parameter has the name and length of the field containing the media type for the content of the Atom entry.

<content> tags for Atom entry content

If your content is not in the expected media type that CICS supplied to the service routine in the ATMP_MTYPEOUT parameter in the DFHATOMPARMS container, you must include the tag <content> in the container at the beginning of your content, and the closing tag </content> at the end. If your content is anything other than plain text, you must also add a type attribute to the <content> tag to specify the media type for your content. Some possible type attributes are as follows:
  • <content type="html"> specifies HTML.
  • <content type="xhtml"> specifies XHTML.
  • <content type="text/xml"> is the media type that is normally used for a human-readable XML document.
You may specify <content type="text"> when you supply plain text, but the recipients of Atom documents assume this media type if you do not specify any type attribute. If your content is in any other format, specify the IANA media type that you would normally use for that format on the Internet. A listing of media types is available at http://www.iana.org/assignments/media-types/. Note that CICS does not provide support for nontext media types.

For content that is in the expected media type that CICS supplied to the service routine in the ATMP_MTYPEOUT parameter in the DFHATOMPARMS container, you can omit the <content> and </content> tags. In this case, CICS supplies the opening and closing tags and specifies the type attribute as the media type in the ATMP_MTYPEOUT parameter.

Markup for Atom entry content

If you use a format other than plain text for your content, read the processing information in Section 4.1.3.3 of RFC 4287, The Atom Syndication Format, which is available from https://www.ietf.org/rfc/rfc4287.txt. These rules explain how you must arrange your markup and how the recipients of Atom documents (who are known as "Atom Processors") interpret and present the content depending on the type of markup used. In particular, note that HTML markup must be escaped, for example, the tag "<br>" must be written as "&lt;br>". CICS does not validate the markup that you use.

If you want to produce XML content from the fields in your resource record, and your resource has an XML binding with an associated XMLTRANSFORM resource, you can use the CICS functions for transforming application data into XML. If you have a language structure, or copybook, that describes the structure of the data in your resource in any one of the high-level languages supported by the DFHLS2SC procedure, that is, COBOL, C, C++, or PL/I, you can create an XML binding. Generate mappings from language structures explains how to do this. CICS dynamically creates the XMLTRANSFORM resource when you install an ATOMSERVICE resource definition that names the XML binding.

If an XMLTRANSFORM resource is available, CICS provides its name in the ATMP_XMLTRANSFORM parameter in the DFHATOMPARMS container. For more information about the TRANSFORM DATATOXML command and instructions for using the data mapping functions, see Mapping and transforming application data and XML.