Before you can check out a file, you must first add it to ClearCase source control.
Follow the instructions for the platform of interest to you:
To add a file to source control in the ClearCase Explorer, do the following:
Note: To have a file to use for learning to check in and out, the exercise includes creating a small text file named author.txt.
ClearCase users create the author.txt file in the VOB your-username_tut_elements_vob.vbs.
ClearCase LT users create the author.txt file in the VOB cclt_tutorial_sources.vbs.
Before you can create a new element, or add an existing element to source control, you must check out all parent directories of the element using the cleartool checkout command. To retain the parent directory of the view-private file that is being created as a new element, you use the -mkpath option in the cleartool checkout command.
You add a file to source control by using the mkelem command. This command creates one or more new elements. By default, this command will check out the element to your view.
If the element already exists as a view-private file, use the -checkin option to create the new element using the view-private file. To preserve the modification time of the file being checked in, use the -ptime option. If you omit the -ptime option, the modification time of the new version is set to the checkin time.
For example, to add a view-private file named foo.c to source control that is located in the bin directory, you would do the following:
You should not forget to check in the parent directories when you are done, using the cleartool checkin command!
Note: To have a file to use for learning to check in and out, you will first create one in /var/tmp/your-username_tut_elements_vob.
cleartool checkout your-usename_tut_elements_vob
cleartool mkelem -ci -ptime -co “initial content” author.txt
Optional. Review the reference page for the cleartool mkelem command and display it in a Web browser by typing this command: cleartool man -gra mkelem