admin
PURPOSE
Creates and initializes SCCS files.
SYNOPSIS
admin [-n] [-i[name]] [-rrel] [-t[name]] [-fflag[flag-val]]
[-dflag[flag-val]] [-alogin] [-elogin] [-m[mrlist]] [-y[comment]] [-h]
[-z] files
To Create SCCS Files:
To Change Existing SCCS Files:
To Check and Correct Damaged SCCS Files:
DESCRIPTION
The admin command creates new Source Code Control System
(SCCS) files or changes specified parameters in existing
SCCS files. These parameters control how the get command
builds the files that you can edit. They also provide
information about who can access the file, who can make
changes, and when changes were made.
If the named file exists, admin modifies its parameters
as specified by the flags. If it does not exist and you
supply the -i or the -n flag, admin creates the new file
and provides default values for unspecified flags. If
you specify a directory name for file, admin performs the
requested actions on all SCCS files in that directory
(all files with the s. prefix). If you specify a -
(minus) as a file name, admin reads standard input and
interprets each line as the name of an SCCS file. An
end-of-file character (Ctrl-D) ends input.
The admin command is most often used to create new SCCS
files without setting parameters. See "Examples" for the
syntax used to create an SCCS file with no parameters set
in the new file.
If you are not familiar with the delta numbering system,
see AIX Operating System Programming Tools and Interfaces
for more information.
SCCS FILE CONVENTIONS
All SCCS file names must have the form s.name. New SCCS
files are created with read-only permission. You must
have write permission in the directory to create a file
(see "chmod" for an explanation of file permissions).
admin writes to a temporary x-file, which it calls
x.name. The x-file has the same permissions as the ori-
ginal SCCS file if it already exists, and it is read-only
if admin creates a new file. After successful completion
of admin, the x-file is moved to the name of the SCCS
file. This ensures that changes are made to the SCCS
file only if admin does not detect any errors while it is
running.
Directories containing SCCS files should be created with
permission code 755 (read, write, and execute permissions
for owner, read and execute permissions for group members
and others). SCCS files themselves should be created as
read-only files (444). With these permissions, only the
owner can use non-SCCS commands to modify SCCS files. If
a group can access and modify the SCCS files then the
directories should include group write permission.
The admin command also uses a temporary lock file (called
z.name), to prevent simultaneous updates to the SCCS file
by different users. See "SCCS Files" for additional
information on the z.name file.
The following table contains the header flags that can be
set with the -f flag and unset with the -d flags (see
page ). The header flags control the format of the
g-file created with the get command (see "SCCS Files" for
details on the g-file).
+-------------------+-------------------------------------------------------+
| Header | |
| Flag | Header Flag Purpose |
+-------------------+-------------------------------------------------------+
| b | Lets you use the -b flag of a get command to create |
| | branch deltas. |
+-------------------+-------------------------------------------------------+
| cnum | Makes num the highest release number that a get -e |
| | can use. The value of num must be less than or equal |
| | to 9999. (Its default value is 9999.) |
+-------------------+-------------------------------------------------------+
| fnum | Makes num the lowest release number that a get -e can |
| | retrieve. num must be greater than 0 and less than |
| | 9999. (Its default value is 1.) |
+-------------------+-------------------------------------------------------+
| dSID | Makes SID the default delta supplied to a get |
| | command. |
+-------------------+-------------------------------------------------------+
| i | Treats the "No id keywords (ge6)" message issued by |
| | the get or delta command as an error (see "Identifi- |
| | cation Keywords"). |
+-------------------+-------------------------------------------------------+
| j | Permits concurrent get commands for editing the same |
| | SID of an SCCS file. This allows multiple concurrent |
| | updates to the same version of the SCCS file. |
+-------------------+-------------------------------------------------------+
| lnum[,num] . . . | Locks the releases specified by num . . . against |
| | editing, so that a get -e against one of these |
| | releases fails. You can lock all releases against |
| | editing by specifying -fla and unlock specific |
| | releases with the -d flag. |
+-------------------+-------------------------------------------------------+
| n | Causes delta to create a null delta in any releases |
| | that are skipped when a delta is made in a new |
| | release. For example, if you make delta 5.1 after |
| | delta 2.7, releases 3 and 4 will be null. The |
| | resulting null deltas can serve as points from which |
| | to build branch deltas. Without this flag, skipped |
| | releases do not appear in the the SCCS file. |
+-------------------+-------------------------------------------------------+
| qtext | Substitutes text for all occurrences of the %Q% |
| | keyword in an SCCS text file retrieved by a get |
| | command. (See "Identification Keywords" for more |
| | information on keywords.) |
+-------------------+-------------------------------------------------------+
| mmodule | Substitutes module for all occurrences of the %M% |
| | keyword in an SCCS text file retrieved by a get |
| | command. The default module is the name of the SCCS |
| | file without the s. prefix. |
+-------------------+-------------------------------------------------------+
| ttype | Substitutes type for all %Y% keywords in a g-file |
| | retrieved by a get. |
+-------------------+-------------------------------------------------------+
Figure 1 (Part 1 of 2). SCCS Header Flags
+-------------------+-------------------------------------------------------+
| Header | |
| Flag | Header Flag Purpose |
+-------------------+-------------------------------------------------------+
| v[program] | Makes delta prompt for Modification Request (MR) |
| | numbers as the reason for creating a delta. program |
| | specifies the name of an MR number validity checking |
| | program (see "delta"). If v is set in the SCCS file, |
| | the admin -m flag must also be used, even if its |
| | value is null. |
+-------------------+-------------------------------------------------------+
Figure 1 (Part 2 of 2). SCCS Header Flags
FLAGS
You can enter the flags and input file names in any
order. All flags apply to all the files.
-auser Adds the specified user to the list of
users that can make sets of changes
(deltas), to the SCCS file. user can
be either a user name, a group name, or
a group ID. Specifying a group name or
number is the same as specifying the
names of all users in that group. You
can specify more than one -a flag on a
single admin command line. If an SCCS
file contains an empty user list, then
anyone can add deltas.
If a file has a user list, the creator
of the file must be included in the
list in order for the creator to make
deltas to the file.
-dhdrflag Removes the specified header flag from
the SCCS file. You can specify this
flag only with existing SCCS files.
You can also specify more than one -d
flag in a single admin command. See
Figure 1 for the header flags that
admin recognizes.
-euser Removes the specified user from the
list of users allowed to make deltas to
the SCCS file. Specifying a group ID
is equivalent to specifying all user
names common to that group. You can
specify several -e flags on a single
admin command line.
-fhdrflag[value] Places the specified header flag and
value in the SCCS file. You can
specify more than one header flag in a
single admin command. See Figure 1
for the header flags that admin recog-
nizes.
-h Checks the structure of the SCCS file
and compares a newly computed checksum
with the checksum that is stored in the
first line of the SCCS file. When the
checksum value is not correct, the file
has been improperly modified or has
been damaged. This flag helps you
detect damage caused by the improper
use of nonSCCS commands to modify SCCS
files, as well as accidental damage.
The -h flag prevents writing to the
file, so it cancels the effect of any
other flags supplied. If an error
message is returned indicating the file
is damaged, use the -z flag to recom-
pute the checksum. Then test to see if
the file is corrected by using the -h
flag again.
-i[name] Gets the text for a new SCCS file from
name. This text is the first delta of
the file. If you specify the -i flag
but you omit the file name, admin reads
the text from standard input until it
reaches END OF FILE (Ctrl-D). If you
do not specify the -i flag, but you do
specify the -n flag, admin creates an
empty SCCS file. admin can only create
one file containing text at a time. If
you are creating two or more SCCS files
with one call to admin, you must use
the -n flag, and the SCCS files created
are empty.
-m[mrlist] Specifies a list of Modification
Requests (MR) numbers to be inserted
into the SCCS file as the reason for
creating the initial delta. The v flag
must be set. The MR numbers are vali-
dated if the v flag has a value (the
name of an MR number validation
program). admin reports an error if
the v flag is not set or if MR vali-
dation fails.
-n Creates a new, empty SCCS file. Do not
specify this flag when you use the -i
flag.
-rnum.num Inserts the initial delta into num.num,
the release and version respectively.
You can specify -r only if you also
specify the -i or -n flag. If you do
not specify this flag, the initial
delta becomes release 1, version 1.
Use this flag only when creating an
SCCS file.
-t[file] Takes descriptive text for the SCCS
file from file. If you use -t when
creating a new SCCS file, you must
supply a file name. In the case of
existing SCCS files:
o Without a file name, -t causes
removal of the descriptive text (if
any) currently in the SCCS file.
o With a file name, -t causes text in
the named file to replace the
descriptive text (if any) currently
in the SCCS file.
-y[comment] Inserts comment text into the initial
delta in a manner identical to that of
the delta command. Use this flag only
when you create an SCCS file. If you
do not specify a comment, admin inserts
a line of the following form:
date and time created YY/MM/DD HH:MM:SS by login
-z Recomputes the SCCS file checksum and
stores it in the first line of the SCCS
file (see the -h flag on page ).
Warning: Using admin with this flag on
a damaged file can prevent future
detection of the damage. This flag
should only be used if the SCCS file is
changed using non-SCCS commands because
of a serious error.
EXAMPLES
1. To create an empty SCCS file named s.prog.c:
admin -n s.prog.c
2. To convert an existing text file into an SCCS file:
admin -iprogram.c s.prog.c
This converts the text file "program.c" into the SCCS
file "s.prog.c". The original file remains intact,
but it is no longer needed. You must rename or
delete it before you can use the get command on
"s.prog.c".
RELATED INFORMATION
The following commands: "delta," "ed," "get,"
"help," "prs," and "what."
The sccsfile file in AIX Operating System Technical Ref-
erence.
"Maintaining Different Versions of a Program" in AIX
Operating System Programming Tools and Interfaces.