Library /sys$common/syshlp/helplib.hlb  —  CHECKSUM
    The CHECKSUM command invokes a utility to calculate one or
    more checksums for OpenVMS files. The result, or checksum, is
    available in the DCL symbol CHECKSUM$CHECKSUM.

    For a detailed description of the CHECKSUM utility, see the
    CHECKSUM command description in the VSI OpenVMS DCL Dictionary.

    Format

      CHECKSUM  filespec

1  –  Parameter

 filespec

    Specifies the name of an existing file to be checksummed. The
    asterisk (*)  and percent sign (%) wildcard characters are
    allowed in the file specification.

2  –  Qualifiers

2.1    /ALGORITHM

       /ALGORITHM=option
       /ALGORITHM=XOR (default)

    Selects the algorithm used for file checksums. The default is the
    XOR algorithm for data within records. Options include:

    o  CRC - A CRC-32 algorithm for all bytes within the file
       (possible record structures are ignored); this algorithm is
       also known as AUTODIN II, Ethernet, or FDDI CRC.

    o  MD5 - The MD5 digest, as published by Ronald L. Rivest
       (RFC 1321), for all bytes within the file (possible record
       structures are ignored).

    o  SHA1 - A Secure Hash Algorithm for all bytes within the file
       (possible record structures are ignored). A 160-bit (20-byte)
       hash function designed by the National Security Agency (NSA).

    o  SHA256 - A Secure Hash Algorithm for all bytes within the file
       (possible record structures are ignored). A 256-bit (32-byte)
       hash function designed by the National Security Agency (NSA).

    o  XOR - An XOR algorithm for all data, according to the record
       structure of the file.

2.2    /ALPHA

    Calculates an Alpha-type checksum and is only useful with the
    /IMAGE qualifier on Integrity server systems (that is, it
    checksums Alpha images on Integrity server systems). It is set
    by default on Alpha platforms.

2.3    /FILE

       /FILE (default)

    Calculates a file checksum.

    By default, the XOR algorithm (/ALGORITHM=XOR) is used for the
    checksum. The /FILE qualifier also implies a default file type
    of .DAT. By default, unsigned decimal checksum value is saved in
    the DCL symbol CHECKSUM$CHECKSUM and not output to the screen. By
    specifying /SHOW=DATA, the full filename of the specified input
    file is output in addition to the file checksum, an unsigned
    decimal value.

    The /ALPHA, /I64, or /VAX platform qualifiers do not influence
    the file checksum result. However, /ALPHA and /VAX prohibit the
    /SHOW qualifier because these qualifiers were not available on
    the original Checksum utility for Alpha systems.

2.4    /I64

    Calculates an I64-type checksum and is only useful on Alpha
    systems with /IMAGE or /OBJECT (that is, it checksums Integrity
    servers images or objects on Alpha systems). The /I64 qualifier
    is set by default on Integrity servers platforms.

2.5    /IMAGE

    Calculates a checksum of all image bytes. The image structure
    is followed to include only the image bytes into the checksum.
    Invariant data, such as the linker version and the link date, are
    omitted.

    For Integrity servers images (that is, Integrity servers
    formatted files), a CRC checksum is calculated and additional
    information is output to SYS$OUTPUT, including the following:

    o  The resulting full filename and checksums for the image
       segments

    o  The header checksums and the overall image checksum

    The output values are shown in hexadecimal notation. The DCL
    symbol, CHECKSUM$CHECKSUM, shows the result in hexadecimal
    notation.

    For Alpha and VAX images, an XOR checksum is calculated and
    additional information is output to SYS$OUTPUT:

    o  The resulting full filename and checksums for the image
       sections

    o  The header checksum and the overall image checksum

    The output checksum values are in hexadecimal notation. However,
    the result in the DCL symbol CHECKSUM$CHECKSUM is in unsigned
    decimal notation.

                                   NOTE

       For Alpha and VAX images, the unsigned decimal notation
       of the checksum value in the DCL symbol CHECKSUM$CHECKSUM
       retains compatibility with the previous checksum tool.

    The /IMAGE qualifier implies the default file type of .EXE. For
    Integrity servers images, this qualifier also implies the default
    keyword values HEADERS and SEGMENTS for the /SHOW qualifier.

2.6    /OBJECT

    Calculates a CRC checksum of all Integrity servers object bytes.

    The /OBJECT qualifier follows the ELF-64 object structure to
    include only the object bytes into the checksum. Invariant data,
    as the language processor version and the generation date, are
    omitted.

    Additional information is output to SYS$OUTPUT, including the
    following:

    o  The resulting full filename of the specified input file

    o  The checksums for the object sections, headers, and the
       overall object checksum

    The output checksum values are in hexadecimal notation. The
    result provided in the DCL symbol, CHECKSUM$CHECKSUM, is in
    hexadecimal notation.

    The /OBJECT qualifier implies the default file type of .OBJ. This
    qualifier also implies the default keyword values HEADERS and
    SECTIONS for the /SHOW qualifier.

    On Alpha platforms, it is only applicable with the /Integrity
    servers qualifier.

2.7    /OUTPUT

       /OUTPUT[=filespec]
       /NOOUTPUT

    The /OUTPUT qualifier controls where the output of the command is
    sent. The /NOOUTPUT qualifier suppresses output.

    If you specify /OUTPUT and a file specification
    (/OUTPUT=filespec), the output is sent to the specified file,
    rather than to the current output device, SYS$OUTPUT. If you do
    not enter the qualifier, or if you enter the /OUTPUT qualifier
    without a file specification, the output is sent to SYS$OUTPUT.

    Using the /OUTPUT qualifier does not affect the result (that is,
    the DCL symbol CHECKSUM$CHECKSUM).

2.8    /SHOW

       /SHOW=(option[,...])

    Controls which checksum and additional information is output to
    the device.

    Options for this qualifier are as follows:

    o  ALL - Sets all of the applicable options, with the following
       restrictions:

       -  For file checksums, only the DATA keyword is allowed.

       -  For image checksums, all keywords are allowed.

       -  For object checksums, the SEGMENT keyword is not allowed.

    o  DATA - Outputs the full file name and the file checksum. For
       compatibility, this option is available for /FILE.

    o  EXCLUDED - Formats the data excluded from the image or object
       checksums.

    o  HEADERS - Output checksums of all Integrity servers headers.
       This option is set by default for /IMAGE and /OBJECT.

    o  SECTIONS - Output checksums of all ELF-64 sections. This
       option is set by default for /OBJECT.

    o  SEGMENTS - Output checksums of all ELF-64 program segments.
       This option is set by default for /IMAGE.

2.9    /VAX

    Calculates a VAX-type checksum and is only useful on Integrity
    servers or Alpha systems with /IMAGE to checksum VAX images on
    non-VAX systems.

3  –  Examples

      The CHECKSUM/IMAGE command results in different output for
      Integrity servers and Alpha platforms. Because there are
      different image structures, the names for the checksums differ:

      o  The checksum for Alpha outputs the section number as BLISS
         constant: %D'1' whereas the Integrity servers checksum
         outputs decimal numbers.

      o  The checksum for Alpha outputs the checksums as BLISS
         constant: %X'6C5404CB' whereas the Integrity servers
         checksum outputs DCL-style hexadecimal numbers.

      o  The DCL symbol on Alpha is an unsigned decimal value,
         whereas the DCL symbol for Integrity servers is a
         hexadecimal value.

      On Alpha systems:

  $ CHECKSUM/IMAGE HELLO.EXE

  file DISK$USER:[JOE]HELLO.EXE;10
  image section %D'1' checksum is %X'6C5404CB'
  image section %D'2' checksum is %X'E29D6A3A'
  image section %D'3' checksum is %X'114B0786'
  image header checksum is %X'00000204'
  checksum of all image sections is %X'9F826977'

  $ SHOW SYMBOL CHECKSUM$CHECKSUM

  CHECKSUM$CHECKSUM = "2676124023"

      On Integrity server systems:

  $ CHECKSUM/IMAGE FOOBAR.EXE

  File DISK$USER:[JOE]FOOBAR.EXE;3
  Checksum program segment 0: %X18E293D7
  Checksum program segment 1: %XEFBCE000
  Checksum program segment 2: %XA6D02DD5
  Checksum program segment 3: %X30130E3E
  Checksum dynamic segment %X0F704080
  Elf header checksum: %X7A6AC80F
  Elf program header checksum: %XBF6B41D8
  Elf section header checksum: %X6C770CF6
  Elf (object/image) checksum: %X2EEE7726

  $ SHOW SYMBOL CHECKSUM$CHECKSUM

  CHECKSUM$CHECKSUM = "2EEE7726"
Close Help