val -- validate SCCS file


val [-] [-s] [-rSID] [-mname] [-ytype] files
val -


The val command determines if the specified file is an SCCS file meeting the characteristics specified by the optional argument list. Arguments to val may appear in any order.

The val command has a special argument, -, 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.

This permits one val command with different values for key letters and file arguments. For example:

val - -yc -mabc -mxyz -ypl1

val first checks whether file has a value c for its type flag and value abc for the module name flag. Once this is done, val processes the remaining file, in this case,

val generates diagnostic messages on standard output for each command line and file processed, and also returns a single 8-bit exit code as described below.

The effects of any argument apply independently to each named file on the command line. The arguments are defined as follows:

The presence of this argument silences the diagnostic message normally generated on standard output for any error detected while processing each named file on the command line.

The argument value SID (SCCS identification string) is an SCCS delta number. A check is made to determine if the SID is ambiguous (for example, -r1 is ambiguous because it does not exist but implies 1.1, 1.2, etc., which may exist) or invalid (for example, -r1.0 and -r1.1.0 are invalid because neither is a valid delta number). If the SID is valid and unambiguous, a check is made to determine if it actually exists.

The argument value name is compared with the SCCS %M% keyword in file.

The argument value type is compared with the SCCS %Y% keyword in file.

The 8-bit code returned by val is a disjunction of the possible errors, that is, it can be interpreted as a bit string where (moving from left to right) set bits are interpreted as follows:

bit 0 = missing file argument;
bit 1 = unknown or duplicate argument;
bit 2 = corrupted SCCS file;
bit 3 = cannot open file or file not SCCS;
bit 4 = SID is invalid or ambiguous;
bit 5 = SID does not exist;
bit 6 = %Y%, -y mismatch;
bit 7 = %M%, -m mismatch;

Note that val can process two or more files on a given command line and in turn can process multiple command lines (when reading standard input). In these cases an aggregate code is returned - a logical OR of the codes generated for each command line and file processed.


Use help(CP) for explanations.


val can process up to 50 files on a single command line. Any number above 50 will produce a core dump.

See also

admin(CP), delta(CP), get(CP), help(CP), prs(CP)

Standards conformance

val is conformant with:

X/Open Portability Guide, Issue 3, 1989 .

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005