PDS Validation Tools (PVT) Commands

The following are the commands and options for the PDS Validation Tools. For installation instructions and a list of known issues, see the AAREADME.TXT file in the PVT directory.

PVT Commands:

validate.pl

Description:

This script can run any or all of the following validation tests. (Note that any of these tests can be run individually, using the programs shown in parentheses, below:)

  1. check ISO9660 compliance (isocheck, checkiso.pl)
  2. check for required files and directories (checkreq.pl)
  3. check whether every file has a label (checklab.pl)
  4. find label validation errors (lvtool, listerr.pl)
  5. find new keywords and standard values (lvtool, listnew.pl)
  6. check that the index file points to the data (checkidx.pl)
  7. test for errors in ASCII files (testline.pl)
  8. check references against reference database (checkref.pl)
  9. list keyword/value pairs for inspection (kwvtool, listkwv.pl)

There are two ways to run validate.pl. The first is interactively, where the only input is the root directory of the volume to be validated. The script prompts the user, asking which tests to perform.

The script can also be run in "batch mode," by setting the -b option. If -b is set, all tests are run automatically, no questions asked. If - is set (and -b is not), then the tests corresponding to the numbers given are run. For example, -b -1357 runs the tests numbered 1, 3, 5, and 7, as defined above.

An additional option was added to account for the "pseudo PDS" attached labels used by NAIF. If processing NAIF volumes, use this -n flag.

The volume root (the path to the root directory of the volume) is required. The test report will have the name VOLUME_ID.rpt and will be placed in the same directory as validate.pl, unless the [report directory] is specified.

tkvalid.pl

Description:

This script is a perl/tk front end the PDS Validataion Tools. It gets user input through dialog windows and runs the appropriate validation tests automatically. If the -d option is set, it will run in debug mode and only print out the volume root and tests selected. NOTE: tkvalid.pl requires that the user's perl installation include the Tk module.

checkiso.pl

Description:

This script runs the program ISOCHECK on a CD reader and checks whether the CD it holds is ISO9660 compliant. For Win32 systems, the CD reader is a volume, for example, e:\. For Unix systems, the CD reader is a device file, for example, \dev\cdrom. In any case, checkiso.pl ONLY checks CD media and should NOT be used with anything else. If the CD is ISO9660 compliant, a simple confirmation message is printed. If the CD fails the test, an error message and a report (iso.rpt) is generated.

checkreq.pl

Description:

This script checks that required directories and files are present on a volume. It prints a report to the standard output device. The only option it takes is the path to the root directory of the volume. NOTE: Checkreq.pl does not check for ISO9660 compliance and treats filenames the way perl treats filenames on ISO9660 CD-ROMs.

checklab.pl

Description:

This script checks that every file on a volume has a label, with the exception of files in the EXTRAS directory. The check is not perfect. It does not check actual pointers (which would require parsing every label). It simply checks:

  1. Whether the file has an .LBL, .CAT, or .FMT exntension.
  2. Whether the file has an attached label.
  3. Whether a file without an attached label has an .LBL file with the same basename in the same directory.

Files that fail all three tests are listed as "suspicious," and their status should be checked by inspection. Checklab.pl does no further checking on files or labels, except to test that all files have a nonzero size. This script takes one required input parameter: the root directory of the volume.

If the -a option is set, only attached labels are listed. If the -d option is set, only detatched labels are listed.

Note: the script outputs a list of all the labels it finds in a file named "label.lst". If the tools are run via validate.pl, label.lst is used as input to lvtool and kwvtool, then deleted at end of the run.

listerr.pl

Description:

This script scans the output of lvtool and lists all the errors. If the -f option is set, the output is sorted by file. Otherwise, it is sorted by error type.

Note: Prior to running listerr.pl, lvtool must be run with the -nw option set.

listnew.pl

Description:

This script scans the output of lvtool and lists all the keywords and standard values that are not currently in the data dictionary. If the "-f" option is set, the listing includes the files in which the new keywords and standard values are found. Note: prior to running listnew.pl, lvtool must be run with the "-nw" flag.

checkidx.pl

Description:

This script performs the following tests on the index files:

  1. That every data file specified in INDEX.TAB exists.
  2. That all files in the data directories are indexed.
  3. It prints the volumes indexed in CUMINDEX.TAB.

Checkidx.pl takes one required parameter, the path to the volume root. The index files are found automatically, by searching the INDEX directory. However, the user can specify an alternative directory, which will be searched instead of <:volume root>/INDEX. This is useful if you editing the index tables. NOTE: if you use this option, remember to have ALL index files in the alternative directory.

Data files are also found automatically, according to the PDS standards for volume organization.

If the -v option is set, the program will be more verbose and print out the filenames in the index tables.

testline.pl

Description:

This script performs the following tests on ASCII files:

  1. Whether each line is terminated with a CR-LF pair.
  2. Whether any line exceeds 80 characters in length, including the CR-LF pair.
  3. Whether any line contains an embedded TAB character.
  4. Whether any line conains another character outside the range 20-7E (hexidecimal).

There is one required argument. It can be either the name of a file to test or the absolute path to the volume root, from which all appropriate files are tested recursively. For single file testing, the -l option tells the script to interpret the file as an attached label. For recursive testing, files with TXT, ASC, CAT, LBL, and FMT extensions are automatically checked. All other files are checked to see if an attached label is present. If it is, the attached label portion of the file is tested, unless the -s flag is set. The -s flag causes testline.pl to skip attached labels.

Normally, testline.pl only reports files that have errors. However, if the -v flag is set, all files will be listed.

checkref.pl

Description:

This script checks references in REF.CAT against the AllRefs.txt database. It finds and lists the following:

  1. Duplicate references in REF.CAT
  2. References in *.CAT that are missing from REF.CAT
  3. References in REF.CAT that are not in the database
  4. Citations in REF.CAT that don't match those in the database

When a citation in REF.CAT doesn't match the same reference in the database, both are printed out for comparison. Note: The AllRefs.txt database must be in the current working directory.

Checkref.pl takes one required parameter, the root directory of the volume. If the -p option is set, a private copy of REF.CAT is used. It must be named "REF.CAT" in the current working directory. This is convenient for editing REF.CAT. If the -v option is set, the list of REFKEYIDs in REF.CAT and those cited are also printed out. If the -w option is set, whitespace is ignored when matching citations.

listkwv.pl

Description:

This script runs the program KWVTOOL on all PDS labels found under the volume pointed to by <volume root>. A report is generated under the name "kwv.rpt".

End of Document