Data processing for Atom feeds from CICS
To produce an Atom feed or collection document containing Atom entries, CICS obtains data for the Atom entries either directly from a file or temporary storage queue, or from a service routine that extracts data from another resource.
Figure 1 shows how CICS uses an Atom configuration file to identify and extract relevant data from a record in a file:

- The record in the file contains fields called "Title" and "Content" that hold data for the Atom entry.
- The Atom configuration file includes a <cics:resource> element that identifies the file, a <cics:bind> element that refers to the XML binding for the file, and a <cics:fieldnames> element. The title attribute of the <cics:fieldnames> element identifies the "Title" field in the file record as the field that holds the data for the title of the Atom entry. The content attribute identifies the "Content" field in the file record as the field that holds the data for the content of the Atom entry.
- CICS uses the information in the Atom configuration file and the XML binding to locate and extract the data from the "Title" and "Content" fields in the file record, and uses that data to populate the <atom:title> and <atom:content> elements of an Atom entry in an Atom feed document.
- When CICS has carried out this processing for a series of records from the file to produce the required number of Atom entries, CICS sends the Atom feed document containing the Atom entries to the web client.
Figure 2 shows how CICS obtains data from a record in a database through a user-written service routine program:

- The record in the database contains fields called "Title" and "Content" that hold data for the Atom entry.
- A service routine extracts the data from the "Title" and "Content" fields in the database. If a service routine is working with a resource that has an XML binding, it can obtain the names of the relevant fields from information in a <cics:fieldnames> element in an Atom configuration file, which CICS passes to the service routine as parameters in a container called DFHATOMPARMS. DFHATOMPARMS also contains other information about the web client's request.
- The service routine creates containers called DFHATOMTITLE and DFHATOMCONTENT, and writes the data from the "Title" and "Content" fields into the containers. It then returns the containers to CICS Atom processing.
- The Atom configuration file includes an <atom:title> element that gives a default title for Atom entries, and an <atom:author> element that contains an <atom:name> element giving the author name Joe Bloggs.
- CICS composes an Atom entry using the title and content that were supplied by the service routine in the DFHATOMTITLE and DFHATOMCONTENT containers. The service routine did not supply an author name, so CICS uses the author name from the Atom configuration file. CICS does not need the default title from the Atom configuration file, because the service routine has supplied that data.
- When CICS has called the service routine a number of times to supply data from different database records to produce the required number of Atom entries, CICS sends the Atom feed document containing the Atom entries to the web client.