[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 4

prs Command (SCCS)

Purpose

Displays a Source Code Control System (SCCS) file.

Syntax

prs [ -a ] [ -d String ] [ -r [ SID ] | [ -c Cutoff ] ] [ -e | -l ] File ...

Description

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:

Delta Table Keywords
Keyword Data Represented Value Format
:R: Release number num Simple
:L: Level number num Simple
:B: Branch number num Simple
:S: Sequence number num Simple
:I: SCCS ID string (SID) :R::L::B::S: Simple
:Dy: Year delta created YY Simple
:Dm: Month delta created MM Simple
:Dd: Day delta created DD Simple
:D: Date delta created YY/MM/DD Simple
:Th: Hour delta created HH Simple
:Tm: Minute delta created MM Simple
:Ts: Second delta created SS Simple
:T: Time delta created HH/MM/SS Simple
:DT: Delta type D or R Simple
:P: User who created the delta login name Simple
:DS: Delta sequence number num Simple
:DP: Previous delta sequence number num Simple
:Dt: Delta information :DT::I::D::T::P::DS::DP: Simple
:Dn: Sequence numbers of deltas included :DS: . . . Simple
:Dx: Sequence numbers of deltas excluded :DS: . . . Simple
:Dg: Sequence numbers of deltas ignored :DS: . . . Simple
:DI: Sequence numbers of deltas included,excluded, and ignored :Dn:/:Dx:/:Dg: Simple
:Li: Lines inserted by delta num Simple
:Ld: Lines deleted by delta num Simple
:Lu: Lines unchanged by delta num Simple
:DL: Delta line statistics :Li:/:Ld:/:Lu: Simple
:MR: MR numbers for delta text Multiline
:C: Comments for delta text Multiline

The following table lists the keywords associated with header flags in the SCCS file:

Header Flag Keywords
Keyword Data Represented Value Format
:Y: Module type text Simple
:MF: MR validation flag set yes or no Simple
:MP: MR validation program name text Simple
:KF: Keyword/error warning flag set yes or no Simple
:BF: Branch flag set yes or no Simple
:J: Joint edit flag set yes or no Simple
:LK: Locked releases :R: . . . Simple
:Q: User-defined keyword text Simple
:M: Module name text Simple
:FB: Floor boundary :R: Simple
:CB: Ceiling boundary :R: Simple
:Ds: Default SID :I: Simple
:ND: Null Delta flag set yes or no Simple
:FL: Header flag list text Multiline

The following table lists the keywords associated with other parts of the SCCS file:

Other Keywords
Keyword Data Represented Value Format
:UN: User names text Multiline
:FD: Descriptive text text Multiline
:BD: Body of text text Multiline
:GB: Text in a g-file text Multiline
:W: A what string :Z::M: \tab :I: Simple
:A: A what string :Z::Y::M::I::Z: Simple
:Z: A what string delimiter @(#) Simple
:F: SCCS file name text Simple
:PN: SCCS file path name text Simple

Flags

Each flag or group of flags applies independently to each named file.

-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:

YY[MM[DD[HH[MM[SS]]]]]

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.

Exit Status

This command returns the following exit values:

0 Successful completion.
>0 An error occurred.

Examples

  1. To display information on all deltas generated for SCCS file name s.test.c (including all deltas removed using the rmdel command), type:

    prs -a s.test.c
  2. To display user login name, the number of lines inserted by delta, and the number of lines deleted by delta for SID 1.2 of s.test.c, type:

    prs -r1.2 -d":P:\n:Li:\n:Ld:" s.test.c

Files

/usr/bin/prs Contains the prs command.

Related Information

The admin command, delta command, get command, sccshelp command.

The sccsfile file format.

Source Code Control System (SCCS) Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]