Atom feed sample programs
CICS supplies sample URIMAP and ATOMSERVICE resource definitions, Atom configuration files, XML bindings and service routines.
About Atom sample programs
The samples include:
- DFH0W2F1 - COBOL sample service routine for Atom feeds
- The sample service routine DFH0W2F1 is a COBOL program that handles GET, POST, PUT, and DELETE requests for Atom entries that use data from the CICS sample file FILEA. You can use these interactions as a model for handling resources in your own service routine.
- DFH$W2S1 - C sample service routine
- The sample service routine DFH$W2S1 is a C language program that demonstrates how a
user-written service routine can read the parameters in the DFHATOMPARMS container, update the
metadata and content containers (such as DFHATOMTITLE and DFHATOMCONTENT), and update and return the
DFHATOMPARMS container.
For details of how DFH$W2S1 works, see DFH$W2S1 C sample service routine for Atom feeds.
- Sample Atom feed from FILEA
- CICS provides a set of resources to serve the CICS sample
file FILEA as an Atom feed directly from CICS.
The components shown in the following table are used to serve this Atom feed.
Table 1. Components to run DFH0W2F1 Component Purpose Location URIMAP resource DFH$W2F1 Handles HTTP requests for an Atom feed using FILEA CICS group DFH$WEB2 or your copy ATOMSERVICE resource DFH$W2F1 Names resources used to produce the Atom feed CICS group DFH$WEB2 or your copy Atom configuration file filea.xml Provides metadata and structure for the Atom feed document and Atom entries USSHOME/samples/web2.0/atom XML binding filea.xsdbind and XML schema filea.xsd Inform CICS about the structure of the records in FILEA USSHOME/samples/web2.0/atom When you set up an Atom feed using these components, the URL for web client requests for the Atom feed is as follows:
where host and port are the host name and port number from the TCPIPSERVICE resource that you are using with this Atom feed.http://host:port/atom/f/filea/feed
Prerequisites for Atom sample programs
The sample service routines for Atom feeds are in the SDFHSAMP sample library. The sample
resources for Atom feeds are in two locations:
- The CICS resource group DFH$WEB2.
- The /samples/web2.0/ subdirectory of the root directory for CICS files on z/OS® UNIX, as specified by the CICS system initialization parameter USSHOME. The default value for USSHOME is /usr/lpp/cicsts/cicsts54.
The CICS resources in the resource group DFH$WEB2
reference the files in the /samples/web2.0/ subdirectory using the path
/usr/lpp/cicsts/cicsts54/samples/web2.0/, with the default value for USSHOME. If the
USSHOME system initialization parameter for your CICS region specifies a nondefault root directory for CICS files on z/OS
UNIX, to use the samples you must complete these steps:
- Copy the resource group DFH$WEB2 to a new resource group.
- Modify the URIMAP resource definitions in your copy of the DFH$WEB2 group to change the occurrences of the default directory /usr/lpp/cicsts/cicsts54 in the HFSFILE attribute to the name of the root directory that your CICS region uses for CICS files on z/OS UNIX.
- Modify the ATOMSERVICE resource definitions in your copy of the DFH$WEB2 group to change the occurrences of the default directory /usr/lpp/cicsts/cicsts54 in the CONFIGFILE and BINDFILE attributes to the name of the root directory that your CICS region uses for CICS files on z/OS UNIX.