Checksum Package

STScI ACDSD MASTCASB Documentation

Products
GSC
DSS
GSPC
Science

Publications

Data Access
Related Science 
Missions
HST
GEMINI
VLT
NGST
Virtual Observatory
XMM
Facilities
Plate Scanning
COMPASS ooDB 
Staff Pages

Last Updated Jan 2001

Copyright © 2001 The Association of Universities for Research in Astronomy, Inc. All Rights Reserved.

Purpose :

Compute, store, and compare checksums for arbitrary files

Procedure :

Uses a VMS port of the cksum utility to do the actual checksum calculation in all three programs.

  • DO_CHECKSUM

After computing checksum, will output the filename, checksum, bytecount, and date to the screen. Will not read or write to any files.

If any kind of error is encountered, writes an error message to a file in the current directory called CHECKSUM_ERROR.DAT. Also outputs the error to the screen.

  • STORE_CHECKSUM

After computing the checksum, will write checksum information to the GSH file if the input file has a .VIM or .PIM extension. Otherwise it will write to the filename.CHECKSUM file. It will also write this information to the .DID file unless the /NOANNOTATE qualifier is used. After updating the appropriate files, it will output the filename, checksum, bytecount, and date to the screen.

If any kind of error is encountered, writes an error message to a file in the current directory called CHECKSUM_ERROR.DAT. Also outputs the error to the screen.

  • COMPARE_CHECKSUM

    First finds the old checksum: in the GSH file if the input file has an extension of .PIM or .VIM, or in the filename.CHECKSUM file if it does not. Then computes the checksum for the file and compares it to the stored value that it found. If the comparison is successful, the results are written to the DID file and output to the screen. If the comparison fails, the results are written to the DID file and an error file, and output to the screen.

    For normal errors, writes an error message to a file in the current directory called CHECKSUM_ERROR.DAT. Also outputs the error to the screen. If the checksum comparison fails, a file called filename.COMPARE_CHECKSUM_FAILED is created which contains the failure information. This information is also output to the screen.

Calling Sequence :

DO_CHECKSUM filename
[/qualifiers]
STORE_CHECKSUM filename
[/NOANNOTATE prevents the checksum being stored in the DID file]
[/WORKDIR=vms directory specification indicates that all auxiliary files (gsh, did, checksum) will be looked for in this working directory, rather than (as by default) in the same directory as the input file.
COMPARE_CHECKSUM filename
[/NOANNOTATE prevents the compare results being stored in the DID file]
[/WORKDIR=vms directory specification indicates that all auxiliary files (gsh, did, checksum) will be looked for in this working directory, rather than (as by default) in the same directory as the input file.

Availability :

  • GSSS AXP - yes
  • GSSS VAX - yes
  • PIXELS - no

History/Author :

  • Original Implementation - William Sherman.
  • Some enhancements & documentation - Vicki Laidler

Return to Pipeline Documentation