views:

398

answers:

2

Has anyone here already worked with the Rational / IBM CAL and knows if at all, and how to check for a view's creator/owner (username)? Elements, Vobs etc all have an Owner/Creator, but for some reason views do not?

A: 

I have only do small VB scripts with CAL, as illustrated in this answer about label.

After having checked cc_cal.chm (found in C:\Program Files\IBM, in the latest 7.1.0.1 version of ClearCase installation), I have found their ICCView interface very incomplete, and always prefered to patch the output of a classic:

cleartool lsview -l -full -pro aTagViewName

With that output, I am sure to find whatever information I need.


The only other "pure CAL" way to get some views for a given username is for UCM views, where you can ask the stream for those (but that does not address directly your question)

 Dim Streams As CCStreams 
 Dim Stream As CCStream 
 Set Streams = Project.DevelopmentStreams(Name) 
 For Each Stream In Streams 
       Dim Views As CCViews 
       Set Views = Stream.Views(Name) 
       Dim View As CCView 
       For Each View In Views 
             Str = Str & View.TagName & " in stream: " & _ 
             Stream.Title & vbCrLf 
       Next 
 Next
VonC
A: 

Basically, if you can think of a way to do it with cleartool, the answer is yes. If there isn't a specific interface/object API to do what you want, just create the cleartool object in CAL and stuff your query in there!

The advantage to using CAL is that you only need to load the .dll once, and don't have to pay the price of executing a zillion separate cleartool processes if that's what you'd otherwise have to do.

The CAL documentation sucks, though. In Visual Studio, you can add CAL as a resource by finding the DLL in your resource explorer, and talk to it via COM like anything else.

If you aren't using VB or VB.NET (e.g. C#), you'll have to do a little more type-casting than you see in the sample documentation.

Garen
Garen,yep it works fine now.. using a mix of cal and it's interface to cleartool for further commands that the cal does not deliver natively.. and it works quite reliably. Thanks for the help!
Jörg B.