This topic has been locked.
3 replies Latest Post - 2012-01-10T17:01:08Z by HBruchey
Pinned topic Resources in a bundle project
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
I understand that a bundle is a collection of CICS resources, but how do you add resources to a bundle project? Once it's created, the only thing I'm reading is how to edit the cics.xml manifest file. The manifest needs to be updated manually with the appropriate xml statements to add individual Transactions, programs, etc.? Is this the only way? Or is there some point and click way in CICS Explorer to add CICS resources to the bundle? Any information is much appreciated. Thank you.
Updated on 2012-01-10T17:01:08Z at 2012-01-10T17:01:08Z by HBruchey
dweiand 10000034W92 PostsACCEPTED ANSWER
Re: Resources in a bundle project2011-12-30T17:57:16Z in response to HBrucheyHi HBruchey,
The following is quite a few words, but the CICS BUNDLE mechanism is just too cool not to talk about....
You are correct that a CICS BUNDLE resource definition references a directory. That directory contains CICS resources, artifacts, and references. The directory is required to contain a 'manifest' ( META-INF/cics.xml ), that tells CICS what to do with the artifacts in the directory. If the manifest doesn't exist, CICS won't install the BUNDLE.
In CICS TS V4.1, BUNDLEs are used for SCA (Service Component Architecture), Events, and XML transforms. In CICS TS V4.2, Bundles are additionally used by CICS's Atom Support, Event Adapters, and CICS's OSGi support for Java programs. CICS does not yet support the dynamic creation of the more common CICS resources like FILEs and TRANSACTIONs using the BUNDLE mechanism, but I doubt the CICS developers are done with the the BUNDLE resource.
To create the above, on your workstation, you can use the CICS Explorer (or the CICS Explorer SDK installed into an Eclipsed SDK) to create a 'CICS BUNDLE Project'. Creating the CICS BUNDLE project creates a directory on your workstation that contains a META-INF/cics.xml file (i.e. the CICS manifest).
For Event processing, you would right-click on your CICS BUNDLE Project and select New->CICS Event Binding. This creates a file in your BUNDLE Project (i.e. the BUNDLE directory) that ends in .evbind. The CICS manifest is updated to specify that the BUNDLE contains a resource of type 'EVENTBINDING' and the name of the .evbind file. The .evbind file is also opened in an Event Binding Editor where you can define the various aspects of your Event Binding. Using the CICS Explorer SDK you can create the necessary artifacts (that are placed in a CICS BUNDLE Project) for an Atom configuration file, XML Transform, Event binding, Event Processing Adapter, and you can add OSGi bundles to your CICS BUNDLE if you are developing Java programs for CICS TS V4.2.
Once the artifacts are created in your CICS BUNDLE Project in the CICS Explorer, you can right-click on the CICS BUNDLE Project and select 'Export to z/OS UNIX File System' (the verbiage here is different between CICS Explorer releases, but you get the idea). This action uses FTP to transfer the BUNDLE Project (a directory containing artifacts and a CICS manifest) to z/OS. You can then create a CICS BUNDLE definition that references this directory. When CICS installs the resource, CICS verifies that the manifest is present. When the BUNDLE is enabled, CICS dynamically installs the appropriate resource definitions based on the information in the manifest and the artifacts. In the case of the Event Binding, CICS dynamically creates resources like an Event Binding and a Capture Specification. For a BUNDLE containing Atom feed artifacts, CICS would dynamically create resources like an XML Transform, a URIMAP, and an ATOMSERVICE. Once installed, you can display BUNDLEs and their status in your CICS region. You can define multiple resources in a CICS BUNDLE and each resource, once installed, is displayed as a BUNDLE part. You can't see BUNDLE parts using CEMT, but you can using the CICS Explorer.
RDz (Rational Developer for System z) is needed to create artifacts for SCA, but the process is much the same. RDz can also be used to create artifacts for the other facilities supported by CICS BUNDLE mechanism. For example, in the case of the XML Transform, you can use RDz's ability to generate COBOL converter programs to do the parsing (which can be zAAP eligiable). In the case of creating a CICS BUNDLE containing OSGi bundles, you need a very current release of RDz. RDz, in some situations, can transfer the BUNDLE project contents (the directory, manifest, and artifacts) to z/OS using its transfer mechanism as part of a wizard, and can (in some situations) even define and install the associated BUNDLE resource in CICS for you.
So the answer to your question is, yes, both the CICS Explorer and RDz have point and click ways of creating the BUNDLE directory and the manifest, and also creating artifacts for the current resource types that are currently supported by the CICS BUNDLE mechanism.
A awesome aspect of CICS BUNDLEs is that they are extensible. This means that you can use them to create your own CICS resources. An example of this is SupportPac CS1S. Currently, the only way to start a CICS Dynamic Scripting application is to use a 'zero start' at a command line prompt. I expected that most customers, for a production environment, would like their CICS Dynamic Scripting application to start when the corresponding CICS region starts.
To define my own 'ZEROAPP' resource that would start a CICS Dynamic Scripting application, I wrote a program (happened to be in COBOL) that 'registers' my ZEROAPP resource with CICS. This just means that when CICS finds a 'ZEROAPP' resource in a BUNDLE manifest, CICS just LINKs to a program I specify (referred to as the callback program) whenever an install, enable, disable, discard, or display action is requested on the BUNDLE resource. Your callback program can take whatever action it wants, and then reports the resource status to CICS. In the case of an install/enable of the BUNDLE containing my ZEROAPP resource, CICS LINKs to my callback program, my program does the 'zero start', and when the Dynamic Scripting application is started, it reports back to CICS that the BUNDLE status should be 'enabled'. You can put my register program in your PLTPI and the BUNDLE definition for the ZEROAPP resource in a GROUP in one of your startup LISTs, and as expected, the CICS Dynamic Scripting application is started when your CICS region starts up.
In the case of my ZEROAPP resource, you could create everything by hand directly on the z/OS UNIX File system, or you can get some help from the CICS Exporer or RDz. In the CS1S writeup, I tell you how to create a CICS BUNDLE project in the CICS Explorer and how to add the file of information my callback program needs to start your CICS Dynamic Scripting application. CS1S doesn't have a wizard for the CICS Explorer (although that is a great idea), so you have to manually create the artifact file and manually modify the CICS manifest to include the resource type and the name of the artifact file. I have a more detailed explanation of my view of user defined resource types in the CS1S documentation. I was required to make the programs object-code-only (long story), however between the CICS InfoCenter and the CS1S documentation, you should be able to create your own user resource types.
If you are interested in creating your own resource types (for a better understanding of CICS BUNDLEs, for fun, or for a business need), you can search on 'creating user resource types in bundles' in the CICS InfoCenter. The documentation is great; it didn't take me very long to write CS1S.
I hope this helps; I thought it deserved more than a short answer.
HBruchey 060000SVGB43 PostsACCEPTED ANSWER
Re: Resources in a bundle project2012-01-10T17:01:08Z in response to dweiandDennis,
First, thank you for the detailed answer, and yes, it was quite a few words. It took me a bit to digest it all. A couple of our Application Developers have been working with the Event Bindings and running some tests in our non-Production environments. I've been poking around a little bit more since receiving your response. I'm looking at this statement specifically - "CICS does not yet support the dynamic creation of the more common CICS resources like FILEs and TRANSACTIONs using the BUNDLE mechanism". That was what I was looking for when asking about manually modifying the manifest. As for documentation, yes, I've been looking at the InfoCenter, the Help in Explorer, as well as some other manuals and links - LOTS of information to digest. Thank you for clarifying this issue for me.
dweiand 10000034W92 PostsACCEPTED ANSWER
Re: Resources in a bundle project2011-12-30T18:16:41Z in response to HBrucheyOne more comment....
You said the "only thing I'm reading is how to edit the cics.xml manifest file.". This tells me you are reading the CICS InfoCenter. You may also want to take a look at help documentation in the CICS Explorer as it explains the various wizards and editors in the CICS Explorer that can be used to create CICS BUNDLE artifacts and modify the CICS manifest.