Displays a Source Code Control System (SCCS) file.
The prs command first reads the specified files and then writes to standard output a part or all of a Source Code Control System (SCCS) file. If you specify a directory for the File parameter, the prs command performs the requested actions on all SCCS files (those with the s. prefix). If you specify a - (minus) for the File parameter, the prs command reads standard input and interprets each line as the name of an SCCS file. The prs command continues to read input until it reaches an end-of-file character.
Data Keywords
Data keywords specify the parts of an SCCS file to be retrieved and written to standard output. All parts of an SCCS file have an associated data keyword. There is no limit to the number of times a data keyword can be in a specified file.
The information that the prs command displays consists of user-supplied text and appropriate values (extracted from the SCCS file) substituted for the recognized data keywords in the order they are displayed in the specified file. The format of a data keyword value is either simple, in which the keyword substitution is direct, or multiline, in which the substitution is followed by a carriage return. Text consists of any characters other than recognized data keywords. Specify a tab character with \t (backslash, letter t) and a carriage return or new-line character with a \n (backslash, letter n). Remember to use the \t and \n with an extra \ (backslash) to prevent the shell from interpreting the \ and passing only the letter t or n to the prs command as text.
The following table lists the keywords associated with information in the delta table of the SCCS file. All the keywords have a simple format unless otherwise indicated.
Keyword | Data Represented | Value |
---|---|---|
:R: | Release number | num |
:L: | Level number | num |
:B: | Branch number | num |
:S: | Sequence number | num |
:I: | SCCS ID string (SID) | :R::L::B::S: |
:Dy: | Year delta created | YY |
:Dm: | Month delta created | MM |
:Dd: | Day delta created | DD |
:D: | Date delta created | YY/MM/DD |
:Th: | Hour delta created | HH |
:Tm: | Minute delta created | MM |
:Ts: | Second delta created | SS |
:T: | Time delta created | HH/MM/SS |
:DT: | Delta type | D or R |
Item | Description | Value |
---|---|---|
:P: | User who created the delta | login name |
:DS: | Delta sequence number | num |
:DP: | Previous delta sequence number | num |
:Dt: | Delta information | :DT::I::D::T::P::DS::DP: |
:Dn: | Sequence numbers of deltas included | :DS: . . . |
:Dx: | Sequence numbers of deltas excluded | :DS: . . . |
:Dg: | Sequence numbers of deltas ignored | :DS: . . . |
:DI: | Sequence numbers of deltas included,excluded, and ignored | :Dn:/:Dx:/:Dg: |
:Li: | Lines inserted by delta | num |
:Ld: | Lines deleted by delta | num |
:Lu: | Lines unchanged by delta | num |
:DL: | Delta line statistics | :Li:/:Ld:/:Lu: |
:MR: (multiline format) | MR numbers for delta | text |
:C: (multiline format | Comments for delta | text |
The following table lists the keywords associated with header flags in the SCCS file. All the keywords have a simple format unless otherwise indicated.
Keyword | Data Represented | Value |
---|---|---|
:Y: | Module type | text |
:MF: | MR validation flag set | yes or no |
:MP: | MR validation program name | text |
:KF: | Keyword/error warning flag set | yes or no |
:BF: | Branch flag set | yes or no |
:J: | Joint edit flag set | yes or no |
:LK: | Locked releases | :R: . . . |
:Q: | User-defined keyword | text |
:M: | Module name | text |
:FB: | Floor boundary | :R: |
:CB: | Ceiling boundary | :R: |
:Ds: | Default SID | :I: |
:ND: | Null Delta flag set | yes or no |
:FL: (multiline format) | Header flag list | text |
The following table lists the keywords associated with other parts of the SCCS file. All the keywords have a simple format unless otherwise indicated.
Keyword | Data Represented | Value |
---|---|---|
:UN: (multiline format) | User names | text |
:FD: (multiline format) | Descriptive text | text |
:BD: (multiline format) | Body of text | text |
:GB: (multiline format) | Text in a g-file | text |
:W: | A what string | :Z::M: \tab :I: |
:A: | A what string | :Z::Y::M::I::Z: |
:Z: | A what string delimiter | @(#) |
:F: | SCCS file name | text |
:PN: | SCCS file path name | text |
Each flag or group of flags applies independently to each named file.
Item | Description |
---|---|
-a | Writes information for the specified deltas, whether or not they have been removed (see the rmdel command). If you do not specify the -a flag, the prs command supplies information only for the specified deltas that have not been removed. |
-c Cutoff | Specifies a cutoff date and time for the -e and -l flags.
Specify the Cutoff value in the following form:
All omitted items default to their maximum values, so specifying -c8402 is the same as specifying -c840229235959. You can separate the fields with any non-numeric character. For example, you can specify -c84/2/20,9:22:25 or -c"84/2/20 9:22:25" or "-c84/2/20 9:22:25". The -c flag cannot be specified with the -r flag. |
-d String | Specifies the data items to be displayed. The string consists of optional text and SCCS file-data keywords. The string may include MBCS (multibyte character set) characters. If the string contains spaces, you must enclose the string in quotation marks. |
-e | Requests information for all deltas created earlier than and including the delta specified by the -r flag. |
-l | Requests information for all deltas created later than and including the delta specified by the -r flag. |
-r [SID] | Specifies the SCCS ID string (SID) of the delta for which the prs command will retrieve information. Do not enter a space between the -r flag and the optional SID parameter. If no SID is specified, the command retrieves the information for the SID of the highest numbered delta. The -r flag cannot be specified with the -c flag. |
This command returns the following exit values:
Item | Description |
---|---|
0 | Successful completion. |
>0 | An error occurred. |
prs -a s.test.c
prs -r1.2 -d":P:\n:Li:\n:Ld:" s.test.c
Item | Description |
---|---|
/usr/bin/prs | Contains the prs command. |