[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4 Files Reference

sccsfile File Format

Purpose

Describes the format of a Source Code Control System (SCCS) file.

Description

The SCCS file is an ASCII file consisting of the following logical parts:

Checksum The logical sum of all characters except the characters in the first line
Delta table Information about each delta including type, SCCS identification (SID) number, date and time of creation, and comments about the delta
User Names Login names, group names, or numerical group IDs of users who are allowed to add or remove deltas from the SCCS file
Header flags Flags defining how some SCCS commands work with the SCCS file, or defining values for identification keywords in the file
Comments Descriptive information about the file
Body The actual text lines intermixed with control lines
Note: Several lines in an SCCS file begin with the ASCII SOH (start-of-heading) character (octal 001). This character is called the control character and is represented graphically as the @ (at sign) in the following text. Any line described in the following text that does not begin with the control character contains text from the source file. Text lines cannot begin with the control character.

Checksum

The checksum is the first line of an SCCS file. This line has the following format:

@hNumber

The control character and variables in the checksum line have the following meanings:

@h Designates a magic number of 064001 octal (or 0x6801).
Number Represents the logical sum of all characters in the SCCS file (not including the characters in this line). It is recalculated each time the SCCS file is updated with SCCS commands, and is used to detect possibly damaging changes made to an SCCS file by non-SCCS commands.

Delta Table

Each time a group of changes, known as a delta, is made to an SCCS file, the delta table creates a new entry. Each entry contains descriptive information about the delta. The @s (at sign, letter s) character defines the beginning of a delta table entry, and the @e (at sign, letter e) character defines the end of the entry. For each delta created, there is a delta table entry in the following format:

@s NumberLinesInserted/NumberLinesDeleted/NumberLinesUnchanged
@d DeltaType SID Date Time UserID Number PreNumber
@i NumbersIncluded . . .
@x NumbersExcluded . . .
@g NumbersIgnored . . .
@m ModificationRequestNumber
@c Comments . . .

The control characters and variables in the delta table entries have the following meanings:

@s Designates the first line of each entry, which contains the number of lines inserted, deleted, and unchanged from the previous delta.
@d Designates the second line of each entry, which contains the following variables:
DeltaType Type of delta. The letter d designates a normal delta; the letter r designates a delta that has been removed with the rmdel command.
SID SCCS ID (SID) of the delta.
Date Date, in the YY/MM/DD format, that the delta was created.
Time Time, in the HH:MM:SS format, that the delta was created.
UserID Login name that corresponds to the real user ID at the time the delta was created.
Number Serial numbers of the delta.
PreNumber Serial numbers of the delta's predecessor.
@i Indicates the serial numbers of the deltas that are included in the creation of this delta by using the get command with the -i flag. This line can contain several delta numbers and is optional.
@x Indicates the serial numbers of the deltas that were excluded from the creation of this delta by using the get command with the -x flag. This line can contain several delta numbers and is optional.
@g Indicates the serial numbers of the deltas that were ignored in the creation of this delta by using the delta command with the -g flag. This line can contain several delta numbers and is optional.
@m Indicates a modification request (MR) number associated with the delta. There can be several MR lines in an SCCS file, each one containing a different MR number. These lines are optional.
@c Comment lines associated with the delta. There can be several comment lines in an SCCS file. These lines are optional.
@e Ends the delta table entry.

User Names

This section of the file contains the list of login names, group names, or numerical group IDs of users who can add deltas to the file. The names and IDs are separated by new-line characters. This section uses the following control characters:

@u A bracketing line that indicates the beginning of a user-name list. This line appears before the first line in the list.
@U A bracketing line that indicates the end of a user name list. This line appears after the last line in the list.

An empty list allows any user to make a delta. The list is changed using the admin command with the -a or -e flag.

Header Flags

Flags control commands and define keywords used internally in the SCCS. Header flags are set using the admin command with various flags. The format of each line is:

@f Flag Text

The control character and variables in the header flags section have the following meanings:

@fb Branch. Allows the use of the -b flag of the get command to cause a branch in the delta tree.
@fc Ceiling. Defines the highest release number from 0 through 9999 that can be retrieved by a get command for editing. This release number is called the ceiling release number.
@fd Default SCCS ID. Defines the default SID to be used when one is not specified with a get command. When this flag is not set, the get command uses the most recently created delta.
@ff Floor. Defines the lowest release number from 0 through 9999 that can be retrieved by a get command for editing. This release number is called the floor release number.
@fi ID keywords. Controls the No ID keywords error warning message. When this flag is not set, the message is only a warning. When this flag is set, the absence of ID keywords causes an error and the delta fails.
@fj Joint edit. Causes the get command to allow concurrent edits of the same base SID.
@fl Lock releases. Defines a list of releases that cannot be edited with the get command using the -e flag.
@fm Module name. Defines the replacement of a module name for the %M% identification keyword. This value is used to override the default.
@fn No changes. Causes the delta command to insert null deltas (delta entries with no changes) for any skipped releases when a delta for a new release is created. For example, delta 5.1 is created after delta 2.1, skipping releases 3 and 4. When this flag is omitted, skipped releases are omitted from the delta table.
@fq User-defined flag. Defines the replacement of the %Q% identification keyword.
@ft Type of program. Defines the replacement of the %Y% identification keyword.
@fv Program name. Controls prompting for MR numbers in addition to comments on delta creation. If a value is assigned, it defines an MR number validity-checking program.

Comments

When comments are taken from a file containing descriptive text by using the admin command with the -t flag option, the contents of that file are displayed in the comments section. Typically, the comments section contains a description of the purpose of the entire file and uses the following control characters:

@t A bracketing line that indicates the beginning of the comments section. This line appears before the first comment line.
@T A bracketing line that indicates the end of the comments section. This line appears after the last comment line.

Body

The body consists of two types of lines: control lines and text lines. Control lines bracket text lines. The text lines contain pieces of text that were inserted or deleted for a particular version of the file. The control lines that bracket a piece of text indicate whether a piece of text was inserted or deleted, and in what version. When a particular version of a file is created from the SCCS file, the control lines identify the pieces of text that should be added or deleted for that version of the file.

Control lines can be nested within one another, so the same portion of text can be bracketed by several sets of control lines. The body of a long SCCS file can be very complicated. The SCCS commands, however, provide a better way to understand the different versions of an SCCS file.

@INumber Indicates an insert control line. The Number variable indicates the serial number that corresponds to the delta for the control line. Text inserted between this control line and an end control line with the same serial number was inserted as part of the delta that corresponded to the same serial number.
@DNumber Indicates a delete control line. The Number variable indicates the serial number that corresponds to the delta for the control line is indicated by the Number variable. Text deleted between this control line and an end control line with the same serial number was deleted as part of the delta that corresponded to the same serial number.
@ENumber Indicates an end control line. The serial number that corresponds to the delta for the control line is indicated by the Number variable. This indicates the end of a section of text to be inserted or deleted.

Within the text are also identification keywords that are specific to the SCCS file system. These keywords represent identifying information about the SCCS file. When using the get command without the -e or -k flag, these keywords will be replaced by their values. Because different versions have different identifying information, the identification keywords provide an easy way for the SCCS file system to provide the correct identifying information for any version of the file requested by the get command. Keywords can be used to provide several kinds of information:

Related Information

Source Code Control System (SCCS) Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs contains general information about the SCCS file system.

The admin command, delta command, get command, prs command, rmdel command, what command.


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