Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7018283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:01:37+00:00 2026-05-27T23:01:37+00:00

How to find root folder in which a component is associated? I am able

  • 0

How to find root folder in which a component is associated?

I am able to find it manually through project explorer -> Components-> properties

How to do it using cleartool command. I need it as i need to create config spec which can be applied in base clearcase view and view the UCM view contents.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:01:38+00:00Added an answer on May 27, 2026 at 11:01 pm

    Have a look to the options of “Format strings for command output” (fmt_ccase):

     cleartool descr -fmt "%[root_dir]p" component:aComponent@\aPVob
    

    You can get that way to root directory (usually \aVob for “vob component” or “\aVob\aRootDir” for components within a Vob).


    From there, for managing access to specific baselines of UCM components in non-UCM views, you can follow an approach similar to “Merging from a Project to a Non-UCM Branch” in a perl script (done to merge, but you can adapt it, in order to build a config spec for said non-UCM view):

    This script below is for projects which uses recommended baselines, and is given as an example of using the “%[root_dir]p“.
    If you don’t use recommended baselines, you would simply list all components for a given stream:
    cleartool descr -fmt "%[components]CXp" stream:aStream@\aPVob

    print("######## Getting recommended baselines for project 
    '$project'\n");
    my @recbls = split(' ', ‘cleartool lsproject -fmt "%[rec_bls]p" 
    $project‘);
    
    foreach $bl (@recbls) {
    
        my $comp = ‘cleartool lsbl -fmt "%[component]p" $bl‘;
        my $vob = ‘cleartool lscomp -fmt "%[root_dir]p" $comp‘;
    
        #... build your config spec there
    }
    # call cleartool setsc there
    

    You would then generate (and apply to a config spec) a file similar to your other question “Clearcase config spec behaves odd when using setcs command“.


    The OP reports getting this approach working, using Powershell:
    (he had initally issues with my example copied form the IBM site, where hyphens-minus ‘-‘ are replaced by non-ASCII minus ‘–‘: , ‘- vs. –: -–‘: see “What’s the toughest bug you ever found and fixed?“):

    $project="MyComponents@\My_PVOB" 
    $pvob="@\My_PVOB" 
    $Baselines=(cleartool lsproject -fmt "%[rec_bls]p" $project).split() 
    foreach ($bl in $Baselines) { 
      $comp=cleartool lsbl -fmt "%[component]p" $bl"$pvob" 
      $vob = cleartool lscomp -fmt "%[root_dir]p" $comp"$pvob" 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to find all files in project's root folder or subfloders
In HTML, I can find a file starting from the web server's root folder
What is the easiest way, preferably using recursion, to find the shortest root-to-leaf path
I'm using XOM with the following sample data: Element root = cleanDoc.getRootElement(); //find all
I have a C++ project with a folder structure something like so: root/trunk root/trunk/src/...
Just trying to use Java to rename the root of a folder tree. Using
The assembly it's trying to find isn't the root assembly - it's a referenced
strange error. One of which i cannot find any existing resources to solve the
I need to be able to install a program in a shared folder on
I'm working on an ASP .NET 2.0 site which uses a Web Application project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.