You can use Rational Team Concert™ for System z® to obtain dependency data and then query it for your source artifacts in zComponent projects. Dependency data indicates the relationships between source files, such as a COBOL program that includes a shared copybook. You can gather dependency data by parsing source files in the Jazz™ Team Server repository. This parsing is controlled by the build process and, if it is enabled, happens when you update a stream during change delivery.
The parser collects information from the source code, such as the type of source–for example, main or include–and any dependencies, including a COBOL copybook. Parsing supports various languages, including COBOL, PLI, assembler, and others. The parser output is an XML document in resource definition framework (RDF) format. This RDF document is assigned a unique URI composed of the itemId and stateId of the file in the SCM. Those IDs are sufficient to retrieve an artifact from the SCM in a workspace or a stream.
You can use the SPARQL query language to perform various searches against dependency data. Rational Team Concert for System z provides an application programming interface (API) at the server and client levels to perform three default queries (getImpact, getDependents, getResource) or any SPARQL query that you write yourself.
The result of the queries is limited to the URI of the XML document. With the combination of these queries and the XML document, you can easily browse artifacts and navigate from one to another, according to whether you need, for example, to build a list of files for a given program, or to calculate the impact of a change to an included file.
Rational Team Concert for System z collects dependency data when you deliver a change set to a stream in a zComponent Project. When you update a file, Rational Team Concert for System z updates the corresponding dependency data. It is important to note, however, that Rational Team Concert for System z keeps only the latest version of dependency data. This means that you should not turn on dependency metadata collection in several streams that contain the same component, because updating to one stream could corrupt the data from the other stream. To turn on dependency data collection for a single stream, you can define particular team areas related to the stream and customize the process at team level, instead of at the project level.
<ns:name xmlns:ns="http://www.ibm.com/xmlns/zindex/">EPSMTCOM.cpy</ns:name>
<ns:fileTypeCd xmlns:ns="http://www.ibm.com/xmlns/zindex/">INCL</ns:fileTypeCd>
<ns:languageCd xmlns:ns="http://www.ibm.com/xmlns/zindex/">COB</ns:languageCd>
<ns:logicalName xmlns:ns="http://www.ibm.com/xmlns/zindex/">EPSMTCOM</ns:logicalName>
<ns:dependency xmlns:ns="http://www.ibm.com/xmlns/zindex/">
<rdf:Description>
<ns:dependencyName xmlns:ns="http://www.ibm.com/xmlns/zindex2/">EPSNBRPM</ns:dependencyName>
<ns:dependencyType xmlns:ns="http://www.ibm.com/xmlns/zindex2/">COPY</ns:dependencyType>
<ns:fileTypeCd xmlns:ns="http://www.ibm.com/xmlns/zindex2/">INCL</ns:fileTypeCd>
</rdf:Description>
You can make queries in Rational Team Concert for System z with the SPARQL query language. Rational Team Concert for System z offers an API for three default queries for browsing dependencies.
https://localhost:9443/jazz/storage/rtcz/
The variable part is built from the itemId and stateId of the parsed resource. You can retrieve those attributes with the SCM API.https://localhost:9443/jazz/storage/rtcz/_itemId=_ILmFIIWEEd6tRoteGBvdPA_stateId=_IXz8YYWEEd6Gcog_JpIdrw
You can either build such a URI from a known artifact in the SCM, or you can obtain it from a query.PREFIX zindex: <http://www.ibm.com/xmlns/zindex/>
SELECT ?zindex
WHERE {
zindex:logicalName "CustCopy";
zindex:fileTypeCd "INCL". }