It's all about the answers!

Ask a question

scm commands or ant build toolkit calls to get info to expand CMVC keywords embedded in files


Rick Chapman (7111312) | asked May 17 '13, 11:42 a.m.
We have a customer who has migrated all their source from CMVC to RTC.  Their source files contain CMVC keywords that need to be expanded.  I have seen multiple questions in this forum about keyword expansion and a reference to a work item for this that probably isn't going to be completed any time soon.  So, I plan to create a script that will look inside all the files in a source tree and replace CMVC keywords with the appropriate information gotten from RTC.  But, I need help figuring out how to get the file info from RTC.  I have the scm command line interface and the ant build toolkit at my disposal, so if someone could provide the details for using either to get the RTC equivalent info for the following CMVC keywords, I would greatly appreciate it:

%W% = Path Name, Component Name, Release Name, Level Name
%I% = SID of the file
%G% = The date the newest applied delta was created
%U% = The time the newest applied delta was created
%M% = The module name: the value of the m header flag in the SCCS file.
%Z% = The 4-character string @(#) recognized by the what command.

More details about what each of the above keywords mean in CMVC can be found here:
   http://software.clearlake.ibm.com/CMVC/4.0/infocenter/htdocs/help/usersref/content/SupportedKeywords.html

One answer



permanent link
Jeff Care (1.0k3833) | answered May 17 '13, 12:03 p.m.
Best of luck to you. As a former CMVC user (and devotee!) I can feel your pain. This is not going to be an easy task. Additionally CMVC concepts don't always map cleanly to RTC concepts. I don't think you're going to be able to get this info from the scm command line or the build toolkit (at least not all of it): I think you are going to need to write a custom program that uses the SCM API. Here's my best stab; apologies if I butcher the terms, it's been a while since I coded to the RTC SCM API:

  • %W% = assuming you have already loaded the file, you can derive the path name from the local file system; if you map CMVC component == RTC component (which is really not true, but not much else you can do), you can figure this out as well; release name is tough: do you pick the name of the current workspace, or the current flow target? you probably want the flow target; level name is also tough: do you pick the baseline or the snapshot?
  • %I% = you should be able to get the UUID of the file
  • %G% and %U% = I don't know if this is possible. AFAIK the best you can do is the date on the changeset. It doesn't seem possible to get timestamp data about individual changes to files. See this question for more info.
  • %M% and %Z% = no idea on these

Your answer


Register or 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.