Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

Parameters

Command Qualifiers

Examples

/CHANGE_BAR

/COMMENT_DELIMITER

/IGNORE

/MATCH

/MAXIMUM_DIFFERENCES

/MERGED

/MODE

/NUMBER

/OUTPUT

/PARALLEL

/SEPARATED

/SLP

/WIDTH

/WINDOW

HELP DIFFERENCES — VMS 5.2

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

  Format:


    DIFFERENCES  input1-file-spec [input2-file-spec]

Additional information available:

ParametersCommand QualifiersExamples

Parameters

 input1-file-spec

  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-file-spec

  Specifies the second file to be compared. Unspecified fields default
  to the corresponding fields in input1-file-spec. 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.


Command 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 /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 the NONUMBER
  keyword is specified, the default is controlled by  the  /[NO]NUMBER
  command qualifier. If only one option is specified, you can omit the
  parentheses. To specify both  a  change  bar  character  and  either
  NUMBER  or  NONUMBER,  separate the options with a comma and enclose
  the list in parentheses; for example, /CHANGE_BAR=($,NUMBER). 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 resulting keyword  is
  not  ambiguous  and  has at least two 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                Horizontal 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, DIFFERENCES assumes a default comment character based  on
  the  file  type.  For  some  file  types  (COB and FOR), the default
  comment characters are considered  valid  delimiters  only  if  they
  appear  in  the  first  column  of  a  line.  Multicharacter comment
  characters are not allowed.

/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.  (The 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  DIFFERENCES 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,  DIFFERENCES
  lists  records  in  the  output  file  with  all  ignored characters
  deleted.

  If you specify /PARALLEL, 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  DIFFERENCES  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 value if you think that  DIFFERENCES  is
  incorrectly matching sections of the master and revision input files
  after it has detected a difference.

/MAXIMUM_DIFFERENCES

 /MAXIMUM_DIFFERENCES=n

  Terminates DIFFERENCES after a specified number of unmatched records
  (the value n) 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 DIFFERENCES 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,  a  maximum  of  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 specified number (the  value  n)  must  be
  less  than or equal to the number specified in the /MATCH qualifier.
  By default, DIFFERENCES produces a merged listing with  one  matched
  record  listed  after  each  set  of  unmatched  records  (that  is,
  /MERGED=1). If neither  /MERGED  nor  /SEPARATED  nor  /PARALLEL  is
  specified,  the  resulting output is merged, with one matched record
  following each unmatched record.

  Use the /MERGED qualifier to override the default value of 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, DIFFERENCES 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 /PARALLEL or /SLP, /MODE is ignored for that listing
  form.

/NUMBER

 /NUMBER (default)
 /NONUMBER

  Controls whether line numbers are to be generated for records in the
  listing.

/OUTPUT

 /OUTPUT[=file-spec]

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

  When you specify /OUTPUT, 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  n
  specifies  the  number  of  matched  records  to  merge  after  each
  unmatched record; the value n must be  a nonnegative decimal  number
  less than or equal to the number specified in /MATCH.

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

/SEPARATED

  /SEPARATED[=(input1-file-spec[,input2-file-spec])]

  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-file-spec parameter, use
  either  the  first input file specified as the DIFFERENCES parameter
  or the keyword MASTER.  To  specify the input2-file-spec  parameter,
  use  either  the  second  input  file  specified  as the DIFFERENCES
  parameter or the keyword REVISION.

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

/SLP

 /SLP

  Requests that DIFFERENCES 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 /SLP and you do not  specify  /OUTPUT,  DIFFERENCES
  writes  the  output  file  to  a file with the same file name as the
  master input file and a file type of DIF.

/WIDTH

 /WIDTH=n

 Specifies the width of lines in the output listing.

  By default, output is 132 characters wide, unless output is directed
  to  the terminal.  In that case, the output line width is controlled
  by the terminal line width.  Use the SET TERMINAL command to  change
  the terminal line width.

/WINDOW

 /WINDOW=size

  Searches the number of records specified (the value for size) before
  a record is declared as unmatched. By default, DIFFERENCES  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 DIFFERENCES to lose synchronization between the two input
  files.

Examples

  1.   $ DIFFERENCES EXAMPLE.TXT

       ************
       File DISK1:[GEORGE.TEXT]EXAMPLE.TXT;2
           1   DEMONSTRATION
           2   OF V5.0 DIFFERENCES
           3   UTILITY
       ******
       File DISK1:[GEORGE.TEXT]EXAMPLE.TXT;1
           1   DEMONSTRATION
           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

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

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