Returning Atom entry metadata in containers
If the resource that contains the data for your Atom entries has fields in its records that supply metadata for the individual Atom entries, such as a title or a summary, use the optional metadata containers, such as DFHATOMTITLE, for your service routine to provide this data to CICS.
About this task
The DFHATOMCONTENT container, which holds the content for the Atom entry, is the only container that the service routine is required to return to CICS. A number of other optional containers are available to return any metadata that your service routine can extract from the records in the resource that contains the data for the Atom entries. The records in your resource might not contain any fields to hold metadata, for example, if you are creating an Atom feed from an existing file that was not originally set up for use as an Atom feed. If you do not have any metadata in your records, you do not have to return these containers, but in some cases you will need to supply default metadata when you set up the Atom configuration file for the Atom feed.
The sample service routine DFH$W2S1 shows you how to create the optional containers using the PUT CONTAINER command, and how to populate them with data that you extracted from a record in your resource.
Procedure
- If the records in your resource contain individual titles for Atom entries, use the PUT CONTAINER command to create a container named DFHATOMTITLE, with DATATYPE(CHAR), that contains the title of this Atom entry. This container is optional, but if you do not provide this data from your service routine, you must specify a default title in the Atom configuration file. DFHATOMTITLE container explains what to put in the container.
- If the entries in your resource have individual summaries, use the PUT CONTAINER command to create a container named DFHATOMSUMMARY, with DATATYPE(CHAR), that contains the summary for the Atom entry. This container is optional, but the Atom specification requires a summary if the content of an entry is not text or XML. DFHATOMSUMMARY container explains what to put in the container.
- If you want to use your service routine to provide the name of the author of the entry, use the PUT CONTAINER command to create a container named DFHATOMAUTHOR, with DATATYPE(CHAR), that contains the author's name. This container is optional, but if you do not provide this data from your service routine, you must specify a default name in the Atom configuration file or accept the CICS default. DFHATOMAUTHOR container explains what to put in the container.
- If you want to use your service routine to provide an e-mail address and URI (website address) for the author of the entry, use the PUT CONTAINER command to create containers named DFHATOMEMAIL and DFHATOMAUTHORURI, with DATATYPE(CHAR), that contain these items of data. These containers are optional, and you can provide either, both, or neither of them. DFHATOMEMAIL container and DFHATOMURI container explain what to put in these containers.
- If you want to use your service routine to provide a category for the entry, use the PUT CONTAINER command to create a container named DFHATOMCATEGORY, with DATATYPE(CHAR), that contains a category term for the entry. This container is optional.DFHATOMCATEGORY container explains what to put in the container.
- In the DFHATOMPARMS container, set the appropriate option bit from the ATMP_OPTIONS_OUT parameter for each optional container that you are returning to CICS. DFHATOMPARMS container documents this parameter. The sample service routine DFH$W2S1 shows you how to set these option bits.