'\"macro stdmacro
.if n .pH g1.val @(#)val	40.11 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} val 1 "Source Code Control System Utilities" "\&"
.if \nX=1 .ds x} val 1 "Source Code Control System Utilities"
.if \nX=2 .ds x} val 1 "" "\&"
.if \nX=3 .ds x} val "" "" "\&"
.TH \*(x}
.SH NAME
\f4val\f1 \- validate an \s-1SCCS\s0 file
.SH SYNOPSIS
\f4val \-\f1
.P
\f4val\f1
[\f4\-s\f1]
[\f4\-r\s-1\f2SID\s0\f1]
[\f4\-m\f2name\f1]
[\f4\-y\f2type\f1]
.I files
.SH DESCRIPTION
\f4val\fP
determines if the specified
.I file\^
is an \s-1SCCS\s0 file meeting the characteristics specified by the optional
argument list.
Arguments to
\f4val\fP
may appear in any order.
The arguments consist of keyletter arguments, which begin with a \f4\-\f1, and
named files.
.PP
\f4val\fP
has a special argument, \f4\-\f1, which causes reading of the standard input
until an end-of-file condition is detected.
Each line read is independently processed as if it were a command line argument
list.
.PP
\f4val\fP
generates diagnostic messages on the standard output for each command line
and file processed, and also returns a single 8-bit code on exit as
described below.
.PP
The keyletter arguments are defined as follows.
The effects of any keyletter argument apply independently to each named file
on the command line.
.TP 12
\f4\-s\f1
The presence of this argument silences the diagnostic message normally
generated on the standard output for any error that is detected while
processing each named file on a given command line.
.TP 12 
\f4\-r\f2\s-1SID\s+1\f1 
The argument value
\f2SID\f1 (\s-1SCCS\s+1
identification string) is an \s-1SCCS\s0 delta number.
A check is made to determine if the
.SM \f2SID\f1
is ambiguous (e. g.,
\f4\-r1\f1 is ambiguous because it physically does not exist but implies 1.1, 1.2,
etc., which may exist) or invalid (e. g.,
\f4\*-r1.0\f1 or
\f4\*-r1.1.0\f1 are invalid because neither can exist as a valid delta number).
If the
.SM \f2SID\f1
is valid and not ambiguous, a check is made
to determine if it actually exists.
.TP 12 
\f4\-m\f2name\f1 
The argument value
.I name\^
is compared with the \s-1SCCS\s0 \f4%\&M%\fP keyword in
.IR file .
.TP 12 
\f4\-y\f2type\f1 
The argument value
.I type\^
is compared with the \s-1SCCS\s0 \f4%\&Y%\fP keyword in
.IR file .
.PP
The 8-bit code returned by
\f4val\fP
is a disjunction of the possible errors;
it can be interpreted as
a bit string where (moving from left to right) set bits are interpreted as follows:
.PP
.RS 12
.nf
bit 0 = missing file argument
bit 1 = unknown or duplicate keyletter argument
bit 2 = corrupted \s-1SCCS\s0 file
bit 3 = cannot open file or file not \s-1SCCS\s0
bit 4 = \f2\s-1SID\s0\f1 is invalid or ambiguous
bit 5 = \f2\s-1SID\s0\f1 does not exist
bit 6 = \f4%\&Y%\fP, \f4\-y\f1 mismatch
bit 7 = \f4%\&M%\fP, \f4\-m\f1 mismatch
.fi
.RE
.PP
\f4val\fP
can process two or more files on a given command line and in turn can
process multiple command lines (when reading the standard input).
In these cases an aggregate code is returned: a logical
.SM OR
of the codes generated for each command line and file processed.
.SH "SEE ALSO"
\f4admin\fP(1),
\f4delta\fP(1),
\f4get\fP(1),
\f4help\fP(1,
\f4prs\fP(1).
.SH DIAGNOSTICS
Use
\f4help\fP(1)
for explanations.
.SH NOTES
\f4val\fP
can process up to 50 files on a single command line.
