How CICS supports Atom feeds
CICS supports Atom feeds using the HTTP server functions of CICS web support, and some additional functions to carry out the actions required of a server that supports the Atom format and protocol. You must select or set up a resource that provides the data for your Atom feed, and define the feed to CICS.
Before serving an Atom feed from CICS, you must configure the base components of CICS web support to set CICS up as an HTTP server.
You can create Atom feeds from data held in or produced by existing resources, such as a temporary storage queue, a file, records in a database application, a web service, or output produced by an existing application program. A single record in the resource holds the data for a single Atom entry. Alternatively, you can set up a new resource to contain Atom entries.
If your resource is a file or temporary storage queue defined to CICS, and you have a language structure written in COBOL, C, C++, or PL/I that describes the records in the resource, CICS can extract data directly from the resource to produce the Atom feed. You use the language structure as input to the CICS XML assistant program to produce an XML binding that defines the structure of the resource, so that CICS can map the data to the correct elements in the Atom document.
You can also serve any resource as an Atom feed by writing a program, known as a service routine, that extracts data from each record in the resource to form an Atom entry, and supplies the data to CICS in a set of containers. If you are able to produce an XML binding for your resource, the service routine can make use of the information in the XML binding, but the service routine does not require an XML binding.
- An ATOMSERVICE resource definition to specify where CICS obtains the data to produce Atom documents in response to a web client request.
- A URIMAP resource definition to specify how CICS handles HTTP requests from web clients for the Atom feed. The URIMAP resource references the ATOMSERVICE resource definition. To support your URIMAP resource definition, you must have a TCPIPSERVICE definition that defines an inbound port for CICS® web support, on which CICS can receive HTTP requests.
- An Atom configuration file, which contains the XML syntax for the Atom feed document, together with some elements specific to CICS, such as elements to identify the resource that contains the data for the feed. CICS uses the information in the Atom configuration file to construct an Atom feed document containing a number of Atom entries, which CICS produces using the data from your resource.
If you want to enable web clients to manage and edit the Atom entries in the feed, you can take further steps to set up the Atom feed as a collection. To set up a collection, you create a new URIMAP definition to make the collection available separately from the feed. You also create a new ATOMSERVICE definition and Atom configuration file by copying the equivalent files for the Atom feed from the same data, redefining them to state that they are for a collection, and making minor changes. You then create an Atom service document and optionally an Atom category document to define your collection, and make those documents available through CICS. If you are using a service routine, you must code it to handle web client requests to add, edit, and delete Atom entries from the collection.
Interacting with Atom feeds
When you have set up an Atom feed, web clients can access it to obtain a list of Atom entries. CICS, together with your service routine if used, acts as a server to receive the web clients' HTTP requests and return Atom feed documents containing a number of Atom entries. Many free or commercially available web client applications are able to request, receive and display Atom feeds, including most modern web browsers, dedicated feed readers, and applications that provide further functions, such as applications for creating mashups. Check that the application is described as supporting the Atom format. You can also write your own web client application to make GET requests for Atom feed data.
If you have also set up your Atom feed as a collection, you or others can manage and edit the entries in the feed through a web client that supports HTTP POST, PUT, and DELETE requests for Atom feeds, as described in the Atom Publishing Protocol. If you do not have a web client with this capability, you can use a web client application that lets you compose and send your own HTTP requests and view the responses. You can also write your own web client applications to make POST, PUT, and DELETE requests to Atom collections. If CICS is managing your resource directly, CICS applies the web clients' editing requests to the data that you have made available in the collection, and returns an appropriate response. If you are using a service routine to provide your data, CICS passes the web clients' requests to the service routine using the container interface, and you code the service routine to modify the resource in response to the requests.
Atom feeds from the CA8K SupportPac
If you used the CA8K SupportPac in CICS TS for z/OS®, Version 3.1 or CICS TS for z/OS, Version 3.2 to set up Atom feeds, and you want to upgrade to use the support for Atom feeds in CICS Transaction Server for z/OS, Version 5 Release 5 , you can continue to use your service routines. However, instead of PIPELINE resource definitions, pipeline configuration files, and Resource Layout Mapping structures, you must use ATOMSERVICE resource definitions, Atom configuration files, and XML bindings. You must also make changes to your service routine code to rename the containers and to account for new parameters in one of the containers, then recompile the modules.