Setting up a resource to supply Atom entry data

An Atom feed or collection consists of a series of Atom entries, which are items of data together with suitable metadata. For an Atom feed served by CICS, the data for the Atom entries is taken from the records in a resource, which could be a file, a temporary storage queue, or another resource such as a database table. A single record provides a single Atom entry.

About this task

A record in your resource might hold items of metadata for the Atom entry as well as the content for the Atom entry, or it might hold only the content for the Atom entry. When you set up your Atom feed, you can make CICS supply any required items of metadata that are not held in your resource records.

You can use any of these resources to supply the data for the Atom entries in your Atom feed:
  • A new VSAM file or temporary storage queue that you create to contain Atom entries.
  • An existing VSAM file or temporary storage queue that is defined to CICS, from which CICS can extract data directly to produce the Atom feed. CICS can extract data for Atom feeds from any type of VSAM file, except for an alternate index file that has been defined with the NONUNIQUEKEY attribute. The file must have a unique key for its records. CICS cannot extract data for Atom feeds directly from BDAM files.
  • Any other resource that you can access from a CICS application program. You can deliver a CICS or non-CICS resource using a CICS application program known as a service routine, which extracts data for Atom entries from the resource and supplies it to CICS in containers.

Procedure

Follow the appropriate procedure for the resource you want to supply Atom feed data:

  • To create a new VSAM file or temporary storage queue to contain Atom entries, follow the instructions in Creating a CICS resource to store Atom entries.
  • Create or reuse an XML binding for the data in the VSAM file or temporary storage queue (TSQ). If there is an existing XMLTRANSFORM resource that contains an XML binding for the data, this can be used with the Atom feed. If you do not have an existing XMLTRANSFORM resource:
    1. Find, or write, a language structure that describes the structure of the records in the resource.
      • You can use a high-level language structure, or copybook, in COBOL, C, C++, or PL/I. The language structure must be in a partitioned data set. For a file or temporary storage queue that is used by a CICS application program, a language structure should already exist. You can write a language structure for the records if you do not already have one.
      • Alternatively, you can use an XML schema or WSDL document that describes the structure of the records in the resource.
    2. Use your language structure to produce an XML binding for the resource, as described in Generating mappings from language structures.
      Alternatively, you can use the File Import Wizard in CICS Explorer® to import a source language file into a CICS bundle project to create an XML binding and an associated schema for Atom feeds. This bundle project can then be exported to your CICS region. For more information about the File Import Wizard, see Creating an XML binding for the Atom feed using CICS Explorer.
  • To deliver any other CICS or non-CICS resource, write a service routine to extract data for each Atom entry from a record in the resource, and supply the data to CICS in a set of containers.
    For instructions about writing a service routine, see Writing a program to supply Atom entry data.

What to do next

When you have chosen the resource that holds your Atom entry data, and created an XML binding or a service routine to support the delivery of this data, set up your Atom feed by following the instructions in Setting up CICS definitions for an Atom feed. If you created and installed a BUNDLE resource to create an XMLTRANSFORM resource, which defines the location of the XML binding file, it is possible to reuse this XMLTRANSFORM resource in other Atom feeds.