Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

PARAMETERS

QUALIFIERS

Examples

/CHANGE_BAR

/COMMENT_DELIMITER

/IGNORE

/MATCH

/MAXIMUM_DIFFERENCES

/MERGED

/MODE

/NUMBER

/OUTPUT

/PARALLEL

/SEPARATED

/SLP

/WIDTH

/WINDOW

HELP DIFFERENCES — VMS 5.5-2H4

   Compares the contents of two disk files and displays a listing of
   the records that do not match.

   Format

     DIFFERENCES  input1-filespec [input2-filespec]

Additional information available:

PARAMETERSQUALIFIERS

Examples

PARAMETERS

input1-filespec
   Specifies the first file to be compared. The file specification
   must include a file name and a file type. Wildcard characters are
   not allowed.

input2-filespec
   Specifies the second file to be compared. Unspecified fields
   default to the corresponding fields in the input1-filespec
   parameter. Wildcard characters are not allowed.

   If you do not specify a secondary input file, the DIFFERENCES
   command uses the next lower version of the primary input file.

QUALIFIERS

Additional information available:

/CHANGE_BAR/COMMENT_DELIMITER/IGNORE/MATCH
/MAXIMUM_DIFFERENCES/MERGED/MODE/NUMBER/OUTPUT
/PARALLEL/SEPARATED/SLP/WIDTH/WINDOW

/CHANGE_BAR

      /CHANGE_BAR[=([change-char][,[NO]NUMBER])]

   Marks with the specified character in the left margin each line
   in the input1 file that differs from the corresponding line in
   the input2 file. If you do not specify a change bar character,
   the default is an exclamation point (!)  for ASCII output. If
   you specify hexadecimal or octal output (see the description
   of the /MODE qualifier), the change bar character is ignored
   and differences are marked by a "***CHANGE***" string in the
   record header. The keyword NONUMBER suppresses line numbers in the
   listing. If neither the NUMBER nor NONUMBER keyword is specified,
   the default is controlled by the /[NO]NUMBER command qualifier.
   If you specify only one option, you can omit the parentheses. If
   you use an exclamation point (!)  as the specified character, you
   must enclose it in quotation marks (" "),  for example, /CHANGE_
   BAR=("!",NUMBER).

/COMMENT_DELIMITER

      /COMMENT_DELIMITER[=(character[,...])]

   Ignores lines starting with a specified comment character. If the
   comment character is an exclamation point or semicolon (;),  it
   can appear anywhere in the line and characters to the right of
   the character are ignored. If you specify just one character, you
   can omit the parentheses. Lowercase characters are automatically
   converted to uppercase unless they are enclosed in quotation
   marks. Nonalphanumeric characters (such as ! and ,) must be
   enclosed in quotation marks. You can specify up to 32 comment
   characters by typing the character itself or one of the following
   keywords. (Keywords can be abbreviated provided that the resultant
   keyword is not ambiguous and has at least 2 characters; single
   letters are treated as delimiters.)

   Keyword             Character

   COLON               Colon (:)

   COMMA               Comma (,)

   EXCLAMATION         Exclamation point (!)

   FORM_FEED           Form feed

   LEFT                Left bracket ([)

   RIGHT               Right bracket (])

   SEMI_COLON          Semicolon (;)

   SLASH               Slash (/)

   SPACE               Space

   TAB                 Tab

   The /COMMENT_DELIMITER qualifier is used with or without the
   /IGNORE=COMMENTS qualifier to indicate which comments are to be
   ignored.

   If both the uppercase and lowercase forms of a letter are to
   be used as comment characters, the letter must be specified
   twice, once in uppercase and once in lowercase. If you do not
   include either a comment character or a keyword with the /COMMENT_
   DELIMITER qualifier, the DIFFERENCES command assumes a default
   comment character based on the file type. For some file types
   (COB and FOR), the default comment characters are considered valid
   delimeters only if they appear in the first column of a line.
   Multicharacter comment characters are not allowed.

   The following characters are the default comment delimiters for
   files with the specified file types:

   File Type           Default Comment Character

   B2S, B32, BAS, BLI  !

   CBL, CMD            ! and ;

   COB                 * or / in the first column

   COM, COR            !

   FOR                 ! anywhere and C, D, c, d in the first column

   HLP                 !

   MAC, MAR            ;

   R32, REQ            !

/IGNORE

      /IGNORE=(keyword[,...])

   Inhibits the comparison of the specified characters, strings,
   or records; also controls whether the comparison records are
   output to the listing file as edited records or exactly as they
   appeared in the input file. If you specify only one keyword, you
   can omit the parentheses. The keyword parameter refers either to a
   character or a keyword. The first set of keywords determines what,
   if anything, is ignored during file comparison; the second set of
   keywords determines whether or not ignored characters are included
   in the output. The following keywords are valid options for the
   /IGNORE qualifier:

   BLANK_LINES       Blank lines between data lines.

   COMMENTS          Data following a comment character. (Use the
                     /COMMENT_DELIMITER qualifier to designate one or
                     more nondefault comment delimiters.)

   FORM_FEEDS        Form feed character.

   HEADER[=n]        First n records of the file, beginning with
                     a record whose first character is a form
                     feed. The first record is not ignored if the
                     only character it contains is a form feed. (N
                     indicates the number of records and defaults
                     to 2. A record with a single form feed is not
                     counted.)

   TRAILING_SPACES   Space and tab characters at the end of a data
                     line.

   SPACING           Extra blank spaces or tabs within data lines.

   EDITED            Omits ignored characters from the output
                     records.

   EXACT             Includes ignored characters in the output
                     records.

   PRETTY            Formats output records.

   Each data line is checked for COMMENTS, FORM_FEEDS, HEADER, and
   SPACING before it is tested for TRAILING_SPACES and then BLANK_
   LINES. Therefore, if you direct the DIFFERENCES command to ignore
   COMMENTS, TRAILING_SPACES, and BLANK_LINES, it ignores a record
   that contains several spaces or blank lines followed by a comment.

   By default, the DIFFERENCES command compares every character in
   each file and reports all DIFFERENCES. Also, by default, the
   DIFFERENCES command lists records in the output file with all
   ignored characters deleted.

   If you specify the /PARALLEL qualifier, output records are
   always formatted. To format output records, specify the following
   characters:

   Character                        Formatted Output

   Tab (Ctrl/I)                     1-8 spaces

   Return (Ctrl/M)                  <CR>

   Line feed (Ctrl/J)               <LF>

   Vertical tab (Ctrl/K)            <VT>

   Form feed (Ctrl/L)               <FF>

   Other nonprinting characters     . (period)

/MATCH

      /MATCH=size

   Specifies the number of records that should indicate matching data
   after a difference is found. By default, after the DIFFERENCES
   command finds unmatched records, it assumes that the files once
   again match after it finds three sequential records that match.
   Use the /MATCH qualifier to override the default match size of 3.

   You can increase the /MATCH qualifier value if you feel that the
   DIFFERENCES command is incorrectly matching sections of the master
   and revision input files after it has detected a difference.

/MAXIMUM_DIFFERENCES

      /MAXIMUM_DIFFERENCES=n

   Terminates the DIFFERENCES command after the specified number of
   unmatched records (specified with the n parameter) is found.

   The number of unmatched records is determined by finding the
   maximum number of difference records for each difference section
   and adding them together.

   If the DIFFERENCES command reaches the maximum number of
   differences that you specify, it will output only those records
   that were detected before the maximum was reached. Also, it will
   output, at most, one listing format and return a warning message.

   By default, there is no maximum number of differences. All records
   in the specified input files are compared.

/MERGED

      /MERGED[=n]

   Specifies that the output file contain a merged list of
   differences with the specified number of matched records listed
   after each group of unmatched records. The value of the parameter
   n must be less than or equal to the number specified in the /MATCH
   qualifier. By default, the DIFFERENCES command produces a merged
   listing with one matched record listed after each set of unmatched
   records (that is, /MERGED=1). If the /MERGED, the /SEPARATED, or
   the /PARALLEL qualifier is not specified, the resulting output is
   merged, with one matched record following each unmatched record.

   Use the /MERGED qualifier to override the default value of the
   parameter n, or to include a merged listing with other types of
   output.

/MODE

      /MODE=(radix[,...])

   Specifies the format of the output. You can request that the
   output be formatted in one or more radix modes by specifying the
   following keywords, which may be abbreviated: ASCII (default),
   HEXADECIMAL, or OCTAL. If you specify only one radix, you can omit
   the parentheses.

   By default, the DIFFERENCES command writes the output file in
   ASCII. If you specify more than one radix, the output listing
   contains the file comparison in each specified radix. When you
   specify two or more radix modes, separate them with commas.

   If you specify the /PARALLEL or the /SLP qualifier, the /MODE
   qualifier is ignored for that listing form.

/NUMBER

      /NUMBER (default)
      /NONUMBER

   Includes line numbers in the listing of DIFFERENCES.

/OUTPUT

      /OUTPUT[=filespec]

   Specifies an output file to receive the list of differences. By
   default, the output is written to the current SYS$OUTPUT device.
   If the filespec parameter is not specified, the output is directed
   to the first input file with a file type of DIF. No wildcard
   characters are allowed.

   When you specify the /OUTPUT qualifier, you can control the
   defaults applied to the output file specification as described
   in the VMS DCL Concepts Manual. The default output file type is
   DIF.

/PARALLEL

      /PARALLEL[=n]

   Lists the records with differences side by side. The value of
   the parameter n specifies the number of matched records to merge
   after each unmatched record; it must be a non-negative decimal
   number less than or equal to the number specified in the /MATCH
   qualifier.

   By default, the DIFFERENCES command does not list records after
   each list of unmatched records. Also by default, the DIFFERENCES
   command creates only a list of merged differences.

/SEPARATED

      /SEPARATED[=(input1-filespec[,input2-filespec])]

   Lists sequentially only the records from the specified file that
   contain differences. If no files are specified, a separate listing
   is generated for each file. If only one file is specified, you can
   omit the parentheses. To specify the input1-filespec parameter,
   use either the first input file specified as the DIFFERENCES
   command parameter or the keyword MASTER. To specify the input2-
   filespec parameter, use either the second input file specified as
   the DIFFERENCES command parameter or the keyword REVISION.

   By default, the DIFFERENCES command creates only a merged list of
   differences.

/SLP

   Requests that the DIFFERENCES command produce an output file
   suitable for input to the SLP editor. If you use the /SLP
   qualifier, you cannot specify any of the following output file
   qualifiers: /MERGED, /PARALLEL, /SEPARATED, or /CHANGE_BAR.

   Use the output file produced by the SLP qualifier as input to SLP
   to update the master input file, that is, to make the master input
   file match the revision input file.

   When you specify the /SLP qualifier and you do not specify the
   /OUTPUT qualifier, the DIFFERENCES command writes the output file
   to a file with the same file name as the master input file with
   the file type DIF.

/WIDTH

      /WIDTH=n

   Specifies the width of the lines in the output file. The default
   is 132 characters. If output is written to the terminal, the
   /WIDTH qualifier is ignored and the terminal line width is used.

   Use the SET TERMINAL command to change the terminal line width.

/WINDOW

      /WINDOW=size

   Searches the number of records specified by the size parameter,
   before a record is declared as unmatched. By default, the
   DIFFERENCES command searches to the ends of both input files
   before listing a record as unmatched.

   The window size is the minimum size of a differences section that
   will cause the DIFFERENCES command to lose synchronization between
   the two input files.

Examples

   1.  $ DIFFERENCES EXAMPLE.TXT
       ************
       File DISK1:[GEORGE.TEXT]EXAMPLE.TXT;2
           1   DEMONSTRATION
           2   OF V3.0 DIFFERENCES
           3   UTILITY
       ******
       File DISK1:[GEORGE.TEXT]EXAMPLE.TXT;1
           1   DEMONSTRETION
           2   OF VMS DIFFERENCES
           3   UTILITY
       ************
       Number of difference sections found: 1
       Number of difference records found: 2
       DIFFERENCES/MERGED=1-
              DISK1:[GEORGE.TEXT]EXAMPLE.TXT;2
              DISK1:[GEORGE.TEXT]EXAMPLE.TXT;1

     In this example, the DIFFERENCES command compares the contents
     of the two most recent versions of the file EXAMPLE.TXT in the
     current default directory. The DIFFERENCES command compares
     every character in every record and displays the results at the
     terminal.

   2.  $ DIFFERENCES/WIDTH=80/MODE=(HEX,ASCII) EXAMPLE.TXT/CHANGE_BAR
       ************
       File DISK1:[GEORGE.TEXT]EXAMPLE.TXT;2
           1 ! DEMONSTRATION
           2 ! OF V3.0 DIFFERENCES
           3   UTILITY
       ************
       ************
       File DISK1:[GEORGE.TEXT]EXAMPLE.TXT;2
       RECORD NUMBER 1 (00000001) LENGTH 14 (0000000E)  ***CHANGE***
            204E 4F495441 5254534E 4F4D4544 DEMONSTRATION .. 000000
       RECORD NUMBER 2 (00000002) LENGTH 19 (00000013)  ***CHANGE***
        4E455245 46464944 20302E33 5620464F OF V3.0 DIFFEREN 000000
                                     534543 CES............. 000010
       RECORD NUMBER 3 (00000003) LENGTH 7 (00000007)
                            595449 4C495455 UTILITY......... 000000
       ************
       Number of difference sections found: 1
       Number of difference records found: 2
       DIFFERENCES /WIDTH=80/MODE=(HEX,ASCII)
              DISK1:[GEORGE.TEXT]EXAMPLE.TXT;2/CHANGE_BAR-
              DISK1:[GEORGE.TEXT]EXAMPLE.TXT;1

     The DIFFERENCES command compares the same files as in
     Example 1, but lists the DIFFERENCES in both hexadecimal and
     ASCII formats. The command also specifies that default change
     bars be used in the output. The default change bar notation for
     the hexadecimal output is ***CHANGE***. For the ASCII output,
     the default change bar character is the exclamation point.


   3.  $ DIFFERENCES/OUTPUT  BOSTON::DISK2:TEST.DAT -
       _$ OMAHA::DISK1:[PGM]TEST.DAT

     The DIFFERENCES command compares two remote files and displays
     any DIFFERENCES found. The first file is TEST.DAT on remote
     node BOSTON. The second file is also named TEST.DAT on remote
     node OMAHA. The DIFFERENCES output is located in the file
     DISK1:[PGM]TEST.DIF.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026