val Command (SCCS)

Purpose

Validates SCCS files.

Syntax

val [ -s ] [ -rSID ] [ -mName ] [ -yType ] File ...

Description

The val command reads the specified file to determine if it is a Source Code Control System (SCCS) file meeting the characteristics specified by the accompanying flags. If you specify a - (minus) for the File value, the val program reads standard input and interprets each line of standard input as val flags and the name of an SCCS file. An end-of-file character terminates input.

The val command displays messages to standard output for each file processed.

Flags

Each flag or group of flags applies independently to each named file. The flags can appear in any order.

Item Description
-mName Compares the Name value with the SCCS 31 identification keyword in the specified file. For identification keyword information, see the get command.
-r SID Specifies the SID of the file to be validated. The SID must be valid and unambiguous.
-s Suppresses the error message normally written to standard output.
-yType Specifies a type to compare with the SCCS identification keyword in the specified file.

Exit Status

The val command returns 0 if successful for all files; otherwise, it returns an 8-bit code that is a disjunction of the possible errors. It is interpreted as a bit string in which set bits (from left to right) are interpreted as follows:

Item Description
0x80 Missing file argument.
0x40 Unknown or duplicate option.
0x20 Corrupted SCCS file.
0x10 Cannot open file or file not SCCS.
0x08 SID is invalid or ambiguous.
0x04 SID does not exist.
0x02 , y mismatch.
0x01 31, m mismatch.
Note: The val command can process two or more files on a given command line and 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 processes.

Example

To determine if file s.test.c is an SCCS text file, enter:

val -ytext s.test.c