[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs

Detecting and Repairing Damaged SCCS Files

You can detect and repair damaged SCCS files using the admin command.

Procedure

  1. Check SCCS files on a regular basis for possible damage. Any time an SCCS file is changed without properly using SCCS commands, damage may result to the file. The SCCS file system detects this damage by calculating the checksum and comparing it with the one stored in the delta table. Check for damage by running the admin command with the -h flag on all SCCS files or SCCS directories as shown:
    admin -h s.file1 s.file2 ...
    OR
    admin -h directory1 directory2 ...
    If the admin command finds a file where the computed checksum is not equal to the checksum listed in the SCCS file header, it displays this message:
    ERROR [s.filename]:
    1255-057 The file is damaged. (co6)
  2. If a file was damaged, try to edit the file again or read a backup copy. Once the checksum has been recalculated, any remaining damage will be undetectable by the admin command.
    Note: Using the admin command with the -z flag on a damaged file can prevent future detection of the damage.
  3. After fixing the file, run the admin command with the -z flag and the repaired file name:
    admin -z s.file1

Related Information

Source Code Control System (SCCS) Overview

Using the make Command with Source Code Control System (SCCS) Files

sccsfile file format

admin command, cdc command, delta command, get command, prs command, sccsdiff command


[ Previous | Next | Contents | Glossary | Home | Search ]