'\"! tbl | mmdoc
'\"macro stdmacro
.if n .pH g1.get @(#)get	40.11 of 10/10/89
.\" Copyright 1989 AT&T
'\" t
.nr X
.if \nX=0 .ds x} get 1 "Source Code Control System Utilities" "\&"
.if \nX=1 .ds x} get 1 "Source Code Control System Utilities"
.if \nX=2 .ds x} get 1 "" "\&"
.if \nX=3 .ds x} get "" "" "\&"
.TH \*(x}
.SH NAME
\f4get\f1 \- get a version of an \s-1SCCS\s+1 file
.SH SYNOPSIS
.HP
.na
\f4get\f1
[\f4\-a\f2seq-no.\f1]
[\f4\-c\f2cutoff\f1]
[\f4\-i\f2list\f1]
[\f4\-r\f2\s-1SID\s+1\f1]
[\f4\-w\f2string\f1]
[\f4\-x\f2list\f1]
[\f4\-l\f1[\f4p\f1]]
[\f4\-b\f1]
[\f4\-e\f1]
[\f4\-g\f1]
[\f4\-k\f1]
[\f4\-m\f1]
[\f4\-n\f1]
[\f4\-p\f1]
[\f4\-s\f1]
[\f4\-t\f1]
.IR file "..."
.ad
.SH DESCRIPTION
\f4get\fP
generates an \s-1ASCII\s+1 text file from
each named \s-1SCCS\s+1 file according to the specifications given
by its keyletter arguments,
which begin with \f4\-\f1.
The arguments
may be specified in any order,
but all keyletter arguments apply to all named \s-1SCCS\s+1 files.
If a directory is named,
\f4get\fP
behaves as though each file in the directory were
specified as a named file,
except that non-\s-1SCCS\s+1 files
(last component of the path name does not begin with
\f4s.\f1)
and unreadable files
are silently ignored.
If a name of \f4\-\f1 is given, the standard input is read;
each line of the standard input is taken to be the name of an \s-1SCCS\s+1 file
to be processed.
.PP
The generated text is normally written into a file called the
g-file\^
whose name is derived from the \s-1SCCS\s+1 file name by simply
removing the leading
``\f4s.\f1''
(see also the
.SM FILES
section below).
.PP
Each of the keyletter arguments is explained below
as though only one \s-1SCCS\s+1 file is to be processed,
but the effects of any keyletter argument apply independently to
each named file.
.RS 5
.TP "\w'\f4\-a\f2seq-no.\f1~~'u"
\f4\-r\f2SID\^\f1
The
.SM SCCS
identification string (\s-1SID\s+1) of the version (delta)
of an \s-1SCCS\s+1 file to be retrieved.
.tr ~
Table~1 below shows, for the most useful cases, what version
of an \s-1SCCS\s+1 file is retrieved (as well as the \s-1SID\s+1
of the version to be eventually created by
\f4delta\fP(1)
if the
\f4\-e\f1
keyletter is also used),
as a function of the \s-1SID\s+1 specified.
.tr ~~
.TP
\f4\-c\f2cutoff\^\f1
Cutoff
date-time,
in the form:
.IP
	\f2\s-1YY\f1[\fPMM\f1[\fPDD\f1[\fPHH\f1[\fPMM\f1[\fPSS\f1]]]]]\s+1
.IP
No changes (deltas) to the \s-1SCCS\s+1 file that were created after
the specified \f2cutoff\f1 date-time are included in the generated
\s-1ASCII\s+1 text file.
Units omitted from the date-time default
to their maximum possible values;
that is,
\f4\-c7502\f1
is equivalent to
\f4\-c750228235959\f1.
Any number of non-numeric characters may separate
the two-digit pieces of the \f2cutoff\f1 date-time.
This feature allows one to specify a \f2cutoff\f1 date in the form:
.IP
	\&\f4\-c"77/2/2 9:22:25"\f1.
.tr ~
.TP
\f4\-i\f2list\^\f1
A
\f2list\f1 of deltas to be included
(forced to be applied)
in the creation of the generated file.
The \f2list\f1 has the following syntax:
.IP
.ft 2
	<list> ::= <range> \(or <list> , <range>
.br
	<range> ::= \s-1SID\s+1 \(or \s-1SID\s+1 \- \s-1SID\s+1
.ft 1
.IP
\s-1SID\s+1, the \s-1SCCS\s+1 Identification of a delta, may
be in any form shown in the ``\s-1SID\s+1 Specified'' column of
Table~1.
.TP
\f4\-x\f2list\^\f1
A
\f2list\f1 of deltas to be excluded
in the creation of the generated file.
See the
\f4\-i\f1 keyletter for the
\f2list\f1 format.
.TP
\f4\-e\f1
Indicates
that the
\f4get\fP
is for the purpose of editing or making a change
(delta) to the \s-1SCCS\s+1 file via a subsequent use of
\f4delta\fP(1).
The
\f4\-e\f1
keyletter used in a
\f4get\fP
for a particular version (\s-1SID\s+1) of the \s-1SCCS\s+1 file prevents
further
\f4get\fPs
for editing on the same \s-1SID\s+1 until
\f4delta\fP
is executed or the
\f4j\f1
(joint edit) flag is set in the \s-1SCCS\s+1 file
[see
\f4admin\fP(1)].
Concurrent use of
\f4get \-e\f1
for different \s-1SID\s+1s is always allowed.
.IP
If the
g-file
generated by
\f4get\fP
with an
\f4\-e\f1
keyletter is accidentally ruined in the process of editing it,
it may be regenerated by re-executing the
\f4get\fP
command with the
\f4\-k\f1
keyletter
in place of the \f4\-e\f1 keyletter.
.IP
.SM SCCS
file protection specified via the
ceiling, floor, and authorized user list
stored in the \s-1SCCS\s+1 file
[see
\f4admin\fP(1)]
are enforced when the
\f4\-e\f1
keyletter is used.
.TP
\f4\-b\f1
Used
with the
\f4\-e\f1
keyletter to indicate that the new delta should have
an \s-1SID\s+1 in a new branch
as shown in Table~1.
This keyletter is ignored if the
\f4b\f1
flag is not present in the file
[see
\f4admin\fP(1)]
or if the retrieved
\f4delta\fP
is not a leaf
\f4delta\fP.
(A leaf
\f4delta\fP
is one that has no successors on
the \s-1SCCS\s+1 file tree.)
A branch
\f4delta\fP
may always be created from a non-leaf
\f4delta\fP.
Partial \s-1SID\s+1s are interpreted as shown in the ``\s-1SID\s+1 Retrieved''
column of Table~1.
.TP
\f4\-k\f1
Suppresses
replacement of identification keywords
(see below)
in the retrieved text
by their value.
The
\f4\-k\f1
keyletter
is implied by the
\f4\-e\f1
keyletter.
.TP
\f4\-l\f1[\f4p\f1]
Causes
a delta
summary to be written into an
l-file.
If
\f4\-lp\f1
is used,
then an
l-file
is not created;
the delta summary is written on the standard output instead.
See IDENTIFICATION KEYWORDS for detailed information on 
the l-file.
.TP
\f4\-p\f1
Causes
the text retrieved
from the \s-1SCCS\s+1 file to
be written on the standard output.
No
g-file
is created.
All output that normally goes to the standard output
goes to file descriptor 2 instead,
unless the
\f4\-s\f1
keyletter is used,
in which case it disappears.
.TP
\f4\-s\f1
Suppresses
all output normally written on the
standard output.
However,
fatal error messages (which always go to file descriptor
2) remain unaffected.
.TP
\f4\-m\f1
Causes
each text line retrieved from the \s-1SCCS\s+1 file
to be preceded by the
\s-1SID\s+1
of the delta that inserted the text line in the \s-1SCCS\s+1 file.
The format is:
\s-1SID\s+1,
followed by a horizontal tab, followed by the text line.
.TP
\f4\-n\f1
Causes
each generated text line to be preceded with the
\f4%\&M%\fP identification keyword value
(see below).
The format is:
\f4%\&M%\fP value,
followed by a horizontal tab,
followed by the text line.
When both the
\f4\-m\f1
and
\f4\-n\f1
keyletters are used,
the format is:
\f4%\&M%\fP value,
followed by a horizontal tab,
followed by the
\f4\-m\f1
keyletter generated format.
.TP
\f4\-g\f1
Suppresses
the actual retrieval of text from the \s-1SCCS\s+1 file.
It is primarily used to generate an
l-file,
or to verify the existence of a particular \s-1SID\s+1.
.TP
\f4\-t\f1
Used
to access the most recently created
delta in a given release
(e.g.,
\f4\-r1\f1),
or
release and level
(e.g.,
\f4\-r1.2\f1).
.TP
\f4\-w\f2 string\f1
Substitute \f2string\f1 for all occurrences of
'''	\"	the \& between the % and the W prevents SCCS from interpreting the string when this file is extracted using SCCS or Text Manager
\f4%\&W%\f1 when getting the file.
Substitution occurs prior to keyword expansion.
.TP
\f4\-a\f2seq-no.\f1
The
delta sequence number of the \s-1SCCS\s+1 file delta (version) to be retrieved.
This keyletter is used by the
\f4comb\fP
command;
it is not a generally useful keyletter.
If both the
\f4\-r\f1
and
\f4\-a\f1
keyletters are specified,
only
the
\f4\-a\f1
keyletter is used.
Care should be taken when using the
\f4\-a\f1
keyletter in conjunction with the
\f4\-e\f1
keyletter,
as the \s-1SID\s+1 of the delta to be created
may not be what one expects.
The
\f4\-r\f1
keyletter can be used with the
\f4\-a\f1
and
\f4\-e\f1
keyletters to control the naming of the \s-1SID\s+1 of the delta to
be created.
.RE
.i0
.PP
For each file processed,
\f4get\fP
responds (on the standard output) with the
\s-1SID\s+1
being accessed and
with the number of lines retrieved from the \s-1SCCS\s+1 file.
.PP
If the
\f4\-e\f1
keyletter is used, the
\s-1SID\s+1
of the delta to be made appears
after the
\s-1SID\s+1
accessed and before the number of lines generated.
If there is more than one named file
or if a directory or standard input is named,
each file name is printed
(preceded by a new-line)
before it is processed.
If the
\f4\-i\f1
keyletter is used, included deltas are listed following the
notation ``\f5Included\fP'';
if the
\f4\-x\f1
keyletter is used, excluded deltas are listed following the
notation ``\f5Excluded\fP''.
.bp
.ne 10v
.PP
.in 0
.TS
center expand ;
c s s s s
c1 c1 c1 c1 c0
c c c c c
l c l l l .
TABLE 1. Determination of \s-1SCCS\s+1 Identification String
.sp 1.5p
=
\s-1SID\s+1*	\f4\-b\f1 Keyletter	Other	\s-1SID\s+1	\s-1SID\s+1 of Delta
Specified	Used\(dg	Conditions	Retrieved	to be Created
.sp 1.5p
=
none\(dd	no	R defaults to mR	mR.mL	mR.(mL\^+1)
_
none\(dd	yes	R defaults to mR	mR.mL	mR.mL.(mB\^+1).1
.sp 1.5p
=
R	no	R > mR	mR.mL	R.1***
_
R	no	R = mR	mR.mL	mR.(mL\^+1)
_
R	yes	R > mR	mR.mL	mR.mL.(mB\^+1).1
_
R	yes	R = mR	mR.mL	mR.mL.(mB\^+1).1
_
R	\-	R < mR and	hR.mL**	hR.mL.(mB\^+1).1
\^	\^	R does \f2not\f1 exist	\^	\^
_
R	\-	Trunk succ.#	R.mL	R.mL.(mB\^+1).1
\^	\^	in release > R	\^	\^
\^	\^	and R exists	\^	\^
.sp 1.5p
=
R.L	no	No trunk succ.	R.L	R.(L\^+1)
_
R.L	yes	No trunk succ.	R.L	R.L.(mB\^+1).1
_
R.L	\-	Trunk succ.	R.L	R.L.(mB\^+1).1
\^	\^	in release \(>= R	\^	\^
.sp 1.5p
=
R.L.B	no	No branch succ.	R.L.B.mS	R.L.B.(mS\^+1)
_
R.L.B	yes	No branch succ.	R.L.B.mS	R.L.(mB\^+1).1
.sp 1.5p
=
R.L.B.S	no	No branch succ.	R.L.B.S	R.L.B.(S\^+1)
_
R.L.B.S	yes	No branch succ.	R.L.B.S	R.L.(mB\^+1).1
_
R.L.B.S	\-	Branch succ.	R.L.B.S	R.L.(mB\^+1).1
.sp 1.5p
=
.TE
.in \n(INu
.PP
.PD 0
.TP "\w@***\ \ \ @u"
*
``R'', ``L'', ``B'', and ``S'' are the ``release'', ``level'',
``branch'', and ``sequence'' components of the \s-1SID\s+1, respectively;
``m'' means ``maximum''.
Thus, for example, ``R.mL'' means ``the maximum
level number within release R'';
``R.L.(mB+1).1'' means
``the first sequence number on the
new branch (i.e., maximum branch number plus
one) of level L within release R''.
Note that if the \s-1SID\s+1 specified is of the form ``R.L'',
``R.L.B'', or ``R.L.B.S'', each of the
specified components
must
exist.
.TP
**
``hR'' is the highest
existing
release that is lower than
the specified,
nonexistent,
release\ R.
.TP
***
This is used to force creation of the
first
delta in a
new
release.
.TP
#
Successor.
.TP
\(dg
The
\f4\-b\f1
keyletter is effective only if the
\f4b\f1
flag [see
\f4admin\fP(1)]
is present in the file.
An entry of \f4\-\f1 means ``irrelevant''.
.TP
\(dd
This case applies if the
\f4d\f1
(default \s-1SID\s+1) flag is
not
present in the file.
If the
\f4d\f1
flag
is
present in the file, then the
\s-1SID\s+1 obtained from the
\f4d\f1
flag is interpreted as if it had been specified on the command line.
Thus, one of the other cases in this table applies.
.PD
.SH IDENTIFICATION KEYWORDS
Identifying information
is inserted into the text retrieved from the \s-1SCCS\s+1 file by replacing
identification keywords
with their value wherever they occur.
The following keywords may be used in the text stored in an \s-1SCCS\s+1 file:
.br
.ne 5v
.PP
.PD 0
.TP "\w'Keyword~~~'u"
Keyword
Value
.sp .2
.TP
\f4%\&M%\f1
Module name:
either the value of the
\f4m\f1
flag in the file
[see
\f4admin\fP(1)],
or if absent,
the name of the \s-1SCCS\s+1 file with the
leading
\f4s.\f1
removed.
.TP
\f4%\&I%\f1
\s-1SCCS\s+1 identification (\s-1SID\s+1)
(\f4%\&R%.%\&L%.%\&B%.%\&S%\fP) of the retrieved text.
.TP
\f4%\&R%\f1
Release.
.TP
\f4%\&L%\f1
Level.
.TP
\f4%\&B%\f1
Branch.
.TP
\f4%\&S%\f1
Sequence.
.TP
\f4%\&D%\f1
Current date (\s-1\f2YY/MM/DD\fP\s+1).
.TP
\f4%\&H%\f1
Current date (\s-1\f2MM/DD/YY\fP\s+1).
.TP
\f4%\&T%\f1
Current time (\s-1\f2HH:MM:SS\fP\s+1).
.TP
\f4%\&E%\f1
Date newest applied delta was created (\s-1\f2YY/MM/DD\fP\s+1).
.TP
\f4%\&G%\f1
Date newest applied delta was created (\s-1\f2MM/DD/YY\fP\s+1).
.TP
\f4%\&U%\f1
Time newest applied delta was created (\s-1\f2HH:MM:SS\fP\s+1).
.TP
\f4%\&Y%\f1
Module type:
value of the
\f4t\f1
flag in the \s-1SCCS\s+1 file
[see
\f4admin\fP(1)].
.TP
\f4%\&F%\f1
\s-1SCCS\s+1 file name.
.TP
\f4%\&P%\f1
Fully qualified \s-1SCCS\s+1 file name.
.TP
\f4%\&Q%\f1
The
value of the
\f4q\f1
flag in the file
[see
\f4admin\fP(1)].
.TP
\f4%\&C%\f1
Current line number.
This keyword is intended for identifying messages
output by the program such as ``this should not have happened'' type errors.
It is
not
intended to be used on every line to provide
sequence numbers.
.TP
\f4%\&Z%\f1
The four-character string \f4@\&(#)\f1
recognizable by the
\f4what\fP command.
.TP
\f4%\&W%\f1
A shorthand notation for constructing
\f4what\fP
strings
for UNIX System program files.
\&\f4%\&W%~=~%\&Z%%\&M%\f1<tab>\f4%\&I%\f1
.TP
\f4%\&A%\f1
Another shorthand notation for constructing
\f4what\fP
strings
for non-UNIX System program files:
\f4%\&A%~=~%\&Z%%\&Y%~%\&M%~%\&I%%\&Z%\fP
.PD
.PP
Several auxiliary files may be created by
\f4get\fP.
These files are known generically as the
g-file,
l-file,
p-file,
and
z-file.
The letter before the hyphen is called the tag.
An auxiliary file name is formed from the \s-1SCCS\s+1 file name:
the last component of
all \s-1SCCS\s+1 file names must be of the form \f4s.\f1\f2module-name\f1,
the auxiliary files are named by replacing the leading \f4s\f1
with the tag.
The
g-file
is an exception to this scheme:
the
g-file
is named by removing
the
\f4s.\f1
prefix.
For example,
\f4s.xyz.c\f1,
the auxiliary file names would be
\f4xyz.c\f1,
\f4l.xyz.c\f1,
\f4p.xyz.c\f1,
and
\f4z.xyz.c\f1,
respectively.
.PP
The
g-file,
which contains the generated text,
is created
in the current directory
(unless the
\f4\-p\f1
keyletter is used).
A
g-file
is created in all cases, whether or not any lines of text
were generated by the
\f4get\fP.
It is owned by the real user.
If the
\f4\-k\f1
keyletter is used or implied, its mode is 644;
otherwise its mode is 444.
Only the real user need have
write permission in the current
directory.
.PP
The
l-file
contains
a table showing which deltas were applied
in generating the retrieved text.
The
l-file
is created
in the current directory
if the
\f4\-l\f1
keyletter is used;
its mode is 444 and it is owned by the real user.
Only the real user need have
write permission in the
current directory.
.PP
Lines in the
l-file
have the following format:
.PP
.PD 0
.RS
.nr a 0 1
.af a a
.TP
\n+a.
A blank character if the delta was applied;
\f4\(**\f1 otherwise.
.TP
\n+a.
A blank character if the delta was applied or was not applied and ignored;
\f4\(**\f1 if the delta was not applied and was not ignored.
.TP
\n+a.
A code indicating a ``special'' reason
why the delta was or was not applied:
``\f4I\f1'' (included),
``\f4X\f1'' (excluded),
or
``\f4C\f1'' (cut off by a
\f4\-c\f1
keyletter).
.TP
\n+a.
Blank.
.TP
\n+a.
\s-1SCCS\s+1 identification (\s-1SID\s+1).
.TP
\n+a.
Tab character.
.TP
\n+a.
Date and time (in the form
\s-1\f2YY/MM/DD~HH:MM:SS\fP\s+1)
of creation.
.TP
\n+a.
Blank.
.TP
\n+a.
Login name of person who created \f4delta\fP.
.PD
.RE
.IP
The
comments and
.SM MR
data follow on subsequent lines,
indented one horizontal tab character.
A blank line terminates each entry.
.PP
The
p-file
is used to
pass information resulting from a
\f4get\fP
with an
\f4\-e\f1
keyletter along to
\f4delta\fP.
Its contents are also used to prevent a subsequent
execution of
\f4get\fP
with an
\f4\-e\f1
keyletter
for the same \s-1SID\s+1 until
\f4delta\fP
is executed
or the joint edit flag,
\f4j\f1,
[see
\f4admin\fP(1)]
is set in the \s-1SCCS\s+1 file.
The
p-file
is created in the directory containing the \s-1SCCS\s+1 file
and the effective user must have
write permission
in that directory.
Its mode is 644 and it is owned by the effective user.
The format of the
p-file
is:
the gotten \s-1SID\s+1,
followed by a blank,
followed by the \s-1SID\s+1 that the new delta will have when it is made,
followed by a blank,
followed by the login name of the real user,
followed by a blank,
followed by the date-time
the
\f4get\fP
was executed,
followed by a blank and the
\f4\-i\f1
keyletter argument if it was present,
followed by a blank and the
\f4\-x\f1
keyletter argument if it was present,
followed by a new-line.
There can be an arbitrary number of lines in the
p-file
at any time;
no two lines can have the same new delta \s-1SID\s+1.
.PP
The
z-file
serves as a
lock-out
mechanism against simultaneous updates.
Its contents are
the binary (2 bytes) process \s-1ID\s+1 of the
command
(i.e.,
\f4get\fP
)
that created it.
The
z-file
is created in the directory containing the \s-1SCCS\s+1 file for the duration of 
\f4get\fP.
The same protection restrictions as those for the
p-file
apply for the
z-file.
The
z-file
is created with mode 444.
.SH FILES
.PP
.PD 0
.TP "\w`\f4/usr/bin/bdiff\ \ \fP`u"
g-file
Created by the execution of
\f4get\f1.
.TP
p-file
[see \f4delta\f1(1)]
.TP
q-file
[see \f4delta\f1(1)]
.TP
z-file
[see \f4delta\f1(1)]
.TP
\f4bdiff\fP
Program to compute differences
between the ``gotten'' file and the
g-file.
.PD
.SH SEE ALSO
\f4admin\fP(1),
\f4delta\fP(1),
\f4help\fP(1),
\f4prs\fP(1),
\f4what\fP(1).
.br
\f4bdiff\fP(1) in the \f2User's Reference Manual\f1.
.SH DIAGNOSTICS
Use
\f4help\fP(1)
for explanations.
.SH NOTES
If the effective user has
write permission (either explicitly or implicitly) in the directory
containing the \s-1SCCS\s+1 files,
but the real user does not,
then only one file may be named when the
\f4\-e\f1
keyletter is used.
.tr ~~
.\"	@(#)get.1	6.2 of 9/2/83
.Ee
