Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to extract a count of the number of Components in the repository

We need to provide a count of the number of components in the repository.  Is there a way to extract this information from RTC

0 votes



One answer

Permanent link
A quick and dirty way to do this would be with the SCM command line interface:

lscm login -r https://clmserver.your.com:9443/ccm -n JU -u jazz_user -c
Password (jazz_user @ https://clmserver.your.com:9443/ccm):
Logged in to https://clmserver.your.com:9443/ccm

lscm list components -r JU --all
(1015) "Scrum001 Default Component"
(1016) "Scrum002 Default Component"
...

Capture the output to a file and count the results or pipe it into a program like wc and have it count the lines for you (untested but I don't see why it wouldn't work):

lscm list components -r JU --all | wc -l


Or if you prefer you can write the output as JSON:

lscm list components -r JU --all --json
{
    "components": [
        {
            "name": "Scrum001 Default Component",
            "url": "https:\/\/clmserver.your.com:9443\/ccm\/",
            "uuid": "_4BSP0AXMEeaNrsV1PND6zw"
        },
    ...
}

From there it's just a "simple matter of programming" to parse the JSON and count the components.

See http://www.ibm.com/support/knowledgecenter/SSYMRC_6.0.2/com.ibm.team.scm.doc/topics/list_components.html for the CLI scm list components command syntax.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Sep 30 '16, 4:50 p.m.

Question was seen: 2,106 times

Last updated: Oct 02 '16, 9:50 p.m.

Confirmation Cancel Confirm