IPnom Home • Manuals • ClearCase

 Rational ClearCase Commands Reference

ClearCase Stuff:ClearCase LinksClearCase BooksClearCase Commands ReferenceClearCase ForumsClearCase News
Keyword Live Search (10 results max):
 Type in part of a ClearCase command in the search box.
Commands Index:


Displays configuration record created by clearmake, omake (Windows only), or clearaudit


ProductCommand type
ClearCasecleartool subcommand



  • Display a configuration record:
    catcr [ –r·ecurse | –fla·t | –uni·on | –che·ck [ –uni·on ]
    | –mak·efile ] [ –sel·ect do-leaf-pattern ] [ –ci ]
    [ –typ·e { f | d | l } ... ] [ –ele·ment_only ] [ –vie·w_only ]
    [ –cri·tical_only ] [ –nam·e tail-pattern ]
    [ –zer·o ] [ –wd ] [ –nxn·ame ] [ –fol·low ] [ –l·ong | –s·hort ] do-pname ...

  • Display only the configuration record header and build scripts:
    catcr –scr·ipts_only [ –rec·urse ] [ –l·ong | –s·hort ] do-pname ...


The catcr command displays the configuration records (CRs) for the specified derived objects (DOs) and, optionally, for their build dependencies. The ClearCase make tool (clearmake, or omake for Windows) creates a CR each time it executes a build script that creates one or more DOs. You can also list the configuration record header and build scripts only.

Note: ClearCase creates configuration records for dynamic views only.

For more information about configuration records and derived objects, see Building Software.




Reporting on Derived-Object Subtargets

  catcr lists the derived-object subtargets used to build do-pname, but it does not examine or display subtarget CRs. The –recurse, –flat, –union, –check, and –makefile options direct catcr to recurse into subtarget CRs. Use –select to isolate the CRs of one or more subtargets; use –ci to examine the CRs of pre-built, checked-in DO versions.

Displays the CRs of any derived objects that are subtargets of do-pname. Each CR is displayed separately.

Similar to –recurse, but consolidates the CRs into a single list of versions and derived objects, with no duplicate entries. –flat produces one report for each do-pname on the command line. The report includes file system objects only; no headers, variables and options, or build scripts. A number that precedes each file name indicates the total number of times it was referenced during the build.

Produces one report for all derived objects on the command line. Like –flat, –union consolidates the CRs of each do-pname and its subtargets into a single list of objects, with no duplicate entries. It then combines the separate lists into a single report with no duplicates. The report includes file system objects only—no headers, variables and options, or build scripts are included.

–che·ck [ –uni·on ]
Flags entries in the CR that have unusual characteristics, including references to view-private files (but not references to view-private directories).

You can use –check with –union. This combination determines whether a CR contains any of the following:

  • Versions that are not currently checked in. This includes versions that no longer exist (an intermediate version that only existed as a view-private file, for example), versions that are currently checked out, and versions that were explicitly removed with the rmver command.

  • Multiple versions of the same element. This can occur, for example, if a build used multiple libraries, which were built from different source versions.

  • Multiple references to the same element with different names, such as a renamed element in different directory versions.

Similar to –recurse, but displays the CR in simple makefile format. The listing includes the dependencies and build script for each of the derived object's subtargets. Always include the –wd option with –makefile; this causes catcr to list pathnames relative to the initial working directory of the build. (Note that this behavior differs from the standard behavior of –wd). If you fail to include –wd, cleartool displays a warning message and then displays the makefile without modifying dependency pathnames.

–sel·ect do-leaf-pattern
Starts the listing at the subtarget of do-pname that match the specified pattern. do-leaf-pattern can be a pattern (see the wildcards_ccase reference page) that matches a simple file name; it must not include a slash character (/ \) or the ellipsis wildcard ( ... ). Alternatively, it can be a standard pathname of a derived object.

This option is useful for isolating a derived object that was built as a dependency of another one. For example, this command displays the CR of the derived object named hello.obj that was used to build hello.exe in the current view:

cmd-context catcr -select hello.obj hello.exe 

–ci (for use in recursive listings only)
By default, recursive listings do not display CRs for DO versions. This option displays the CRs for DO versions. –ci only has effect with –recurse, –flat, –union, and –makefile.

Specifying Kinds of Objects to Display

catcr reports on all objects in the CR. These objects may include source files, directories, and symbolic links; derived objects; makefiles; view-private files; and non-MVFS objects that were explicitly declared as dependencies.

–typ·e { f | d | l } ...
Restricts the listing to files only (f), to directories only (d), or to links only (l). If you omit –type, a –short listing includes files only and a –long listing includes all three kinds. To specify multiple kinds of objects, group them into a single argument: –type fd.

Lists versions of elements only, including checked-out versions. This option excludes from the listing derived objects (except DO versions), view-private files and directories, symbolic links, and non-MVFS objects.

Note: If a view-private file listed in the CR is converted to an element after the CR is created and has at least one checked-in version, that file is considered to be an element and is listed by –element_only.

Lists view-private objects only, including checked-out versions of elements. If you specify this option along with –element_only, the listing includes only checked-out versions of elements.

Excludes from the listing any objects marked as noncritical in the CR. Objects typically have that property because the user specified the objects as dependents of the .NO_DO_FOR_SIBLING special target in a clearmake makefile or an omake makefile.

–nam·e tail-pattern
Restricts the MVFS objects listing to those whose final pathname component match the specified pattern. tail-pattern can include any of the wildcard characters described in the wildcards_ccase reference page.

Restricts the listing to the configuration record header and build script.

Controlling Report Appearance

catcr reports, in three sections, on MVFS objects, on variables and options, and on the build script. The report uses full pathnames, and it omits comments and directory versions.

Includes the CR header and options section, even if the specified filters remove all objects. The listing includes the target name, current view, and so on, but no information on particular file system objects.

Lists pathnames relative to the current working directory, rather than full pathnames. With –makefile, lists pathnames relative to the initial working directory of the build.

Lists simple pathnames for MVFS objects, rather than version-extended pathnames or DO IDs.

Lists the link targets only (that is, suppresses printing of the link text).

Expands the listing to include the kinds of objects in the CR and comments. With –makefile, adds comments only. For example, an object may be listed as a version, a directory version, or derived object. (See ls –long for a complete list.) Comments indicate whether an object is in a makefile, a referenced derived object, or a new derived object.

Restricts the listing to file system objects only (omits header information, variables and options, and build scripts). With –makefile, the listing also includes build scripts.

Specifying the Derived Object


do-pname ...
One or more pathnames, specifying the derived objects whose CRs are to be included in the listing. A standard or view-extended pathname specifies the DO in the view. An extended pathname with a DO ID specifies a particular DO, irrespective of view (for example, hello.obj@@24–Mar.11:32.412).

Use the lsdo command to list derived objects with their DO IDs.

do-pname can be a DO version, specified with any version-specification method (standard pathname, version-extended pathname, and so on).


Note: Most examples show the same CR processed with different options. Some output lines have been split for clarity.

  • List the CR for a derived object in the current view named bgrs.

    cmd-context catcr bgrs
    Target bgrs built by jones.dvt
    Host "oxygen" running SunOS 4.1.1 (sun4c)
    Reference Time 11-Dec-94.12:02:39, this audit started 11-Dec-94.12:04:52
    View was oxygen: /home/jones/views/920615.vws
    Initial working directory was vob1/docaux/bgr/sun4
    MVFS objects:
    Variables and Options:
    CFLAGS=-I../I../libbgr -DBSD -DSCCS -g
    OBJECTS=main.o pick.o bugs.o bugr.o bugi.o bugf.o bugc.o bugl.o buge.o
    bugd.o buga.o bugh.o bugw.o bugfld.o bugdt.o bugu1.o bugu2.o bugsched.o
    Build Script:
    /usr/bin/cc -I ../libbgr -DBSD -DSCCS -g main.o pick.o bugs.o
    bugr.o bugi.o bugf.o bugc.o bugl.o buge.o bugd.o buga.o bugh.o
    bugw.o bugfld.o bugdt.o bugu1.o bugu2.o bugsched.o
    -o bgrs ../libbgr/sun4/libbgr.a

  • Combine all CRs associated with bgrs.exe and its subtargets into a single listing.

    cmd-context catcr -flat bgrs.exe
    MVFS objects:
    1 \vob1\docaux\bgr\buga.c@@\main\1 <19-Dec-94.11:49:03>
    1 \vob1\docaux\bgr\bugc.c@@\main\1 <19-Dec-94.11:49:09>
    1 \vob1\docaux\bgr\bugd.c@@\main\1 <19-Dec-94.11:49:14>
    20\vob1\docaux\bgr\bugs.h@@\main\3 <17-Jun-94.23:55:22>
    1 \vob1\docaux\bgr\bugsched.c@@\main\1 <19-Dec-94.11:50:07>


    The integer at the beginning of an entry indicates the number of times the object was referenced during the build. For example, \vob1\docaux\bgr\bugs.h was referenced 20 times.

  • Excerpt from the CR for the bugsched.o subtarget of bgrs the versions of elements involved in the build.

    cmd-context catcr -select bugsched.o -element_only bgrs
    Target bugsched.o built by akp.user
    Host "oxygen" running SunOS 4.1.1 (sun4c)
    Reference Time 11-Dec-94.15:23:21, this audit started 11-Dec-.94.15:23:39
    View was neptune:/usr/people/akp/views/940615.vws
    Initial working directory was /vobs/docaux/bgr/sun4
    MVFS objects:
    /vobs/docaux/bgr/bugs.h@@/main/3 <17-Jun-94.23:55:22>
    /vobs/docaux/bgr/bugsched.c@@/main/2 <11-Dec-94.15:23:04>
    /vobs/docaux/bgr/libbgr/stint.h@@/main/2 <08-Sep-94.10:06:04>
    Variables and Options:
    CFLAGS=-I../libbgr -DBSD -DSCCS -g
    RM=rm -f 
    Build Script:
    rm -f bugsched.o ; /usr/bin/cc -c -I../libbgr -DBSD -DSCCS -g ../bugsched.c

  • List only header files (.h extension) involved in the build of a particular derived object.

    cmd-context catcr -name '*.h' bgrs.exe 
    MVFS objects:
    20\vob1\docaux\bgr\bugs.h@@\main\3 <17-Jun-94.23:55:22>
    19\vob1\docaux\bgr\libbgr\intstint.h@@\main\1 <19-Dec-94.11:54:50>
    36\vob1\docaux\bgr\libbgr\stint.h@@\main\2 <08-Sep-94.10:06:04>
    1\vob1\docaux\bgr\spar.h@@\main\1 <19-Dec-94.11:50:42>

  • List the configuration record header and build script only.

    cmd-context catcr –scripts_only sun5/clearmake
    Target clearmake built by bert.user
    Host "bosco" running SunOS 5.7 (sun4u)
    Reference Time 27-Mar-01.13:30:31, this audit started 27-Mar-01.13:30:52
    View was bosco:/export/home/bert/views/bert_V5.0.BL1.vws
    Initial working directory was /vobs/atria/bin/mmake/sun5
    Build Script:
             @echo "linking clearmake"


clearaudit, clearmake, config_spec, diffcr, ls, lsdo, rmdo, wildcards_ccase, Building Software



ClearCase Links • ClearCase Books • ClearCase Commands Reference • ClearCase Forums • ClearCase News