TABLE CHECKER TOOL PROGRAM

==========================

 

I. INTRODUCTION

 

 

The table checker program is a tool that checks PDS labels and its

corresponding data files. It parses a label, checks for label and data

errors (BINARY or ASCII files), and reports and summarizes its findings

in either an output report or the standard output screen (monitor).

 

 

II. PROGRAM USAGE

 

The table checker program contains several arguments that a user can

input into the command line:

 

OPTIONS:

 

-b          :    Enables batch mode processing

-f          :    Indicates blank fields should be flagged

-l <label>  :    Full path to the label file to be processed

-o <report> :    Directs the report to the named file. Default is

                 to the output screen.

-t          :    Include procssing time in report.

 

----------------------------------------------------------------------

 

-b

When batch mode processing is set, the report prints to the output

screen. If a report file is specified (-o option) along with '-b',

the table checker will override the file name and output all messages

to the output device. Only errors will be reported under this mode.

There are 2 types of formats the errors will come in: label and table

errors.

 

Every error contains a header:

 

<error type>:<line number>:<error code>:<error message>

 

error type    -  Valid values are "L"(label error), "F"(file error),

                 and "T"(table data error)

line number   -  The line number at which the error can be found

error code    -  Each error has an associated integer value

error message -  A description of the error found

 

 

Example:

 

T:1:16:Column 5 (START_TIME) - Invalid TIME format (expecting YYYY-MM-DDThh:mm:s

s[.sss][Z]).

 

-----------------------------------------------------------------------

 

-f

When this flag is set, the table checker program will report blank

fields found in a data file (i.e. fields that are supposed to

contain data, but do not).

 

-----------------------------------------------------------------------

 

-l <label>

<label> is the full path to the label file. If the program executable

and the label file to be processed are in the same directory, there is

no need to specify the full path.

 

-----------------------------------------------------------------------

 

-o <report>

<report> is the name of the output report. Default is to the output

device.

 

-----------------------------------------------------------------------

 

-t

Enable the program to record the processing time of the label being

checked.

 

----------------------------------------------------------------------

 

 

 

III. OUTPUT REPORT DESCRIPTION

 

The table checker program outputs a list of errors, if found, and then

summarizes the label and data being read. The table checker program

does not check for all errors as extensively as the Label Verifier tool

(lvtool). Rather, it checks for certain errors such as the following:

 

            Value greater than MAXIMUM                                         

            Value less than MINIMUM                                            

            Adjusted value greater than DERIVED_MAXIMUM                        

            Adjusted value less than DERIVED_MINIMUM                           

            Value greater than VALID_MAXIMUM                                   

            Value less than VALID_MINIMUM                                       

            Not a valid integer                                                

            Not a valid real number                                            

            Non-printing character in CHARACTER field                          

            Record length not equal to RECORD_BYTES                            

            Record does not have carriage-return (\r)                          

            'E' format field does not have an exponent                         

            'F' format field decimal point does not align with precision value 

            'I' format field is not right-justified                            

            Blank field                                                        

            Invalid DATE field (expecting YYYY-MM-DD)                          

            Invalid TIME format (expecting YYYY-MM-DDThh:mm:ss[.sss][Z])

 

Appendix A lists other types of errors that the table checker can produce.

 

Table and its column attributes are printed in the SUMMARY portion of

the report. It will contain the following information like so:

 

 Table attributes

 ----------------

 Table object 1: TABLE

       ROWS:     56

    COLUMNS:      4

  ROW_BYTES:     46

 

  Col    Name                 Start   Bytes   Items   Type

    1    TIME                     1     13       1    Real     

    2    DN                      14     13       1    Real     

    3    SIGNAL                  27     12       1    Character

    4    WAVELENGTH              39      5       1    Signed Integer

 

 

The other part of the SUMMARY portion of the report will contain a table

of non-blank and special characters per table column. This table only

applies to ASCII files being checked. The table will look like the

following:

 

 Number of Non-Blank Characters per Table Column:

 

          0      1      2      3      4      5      6      7      8      9

-----------------------------------------------------------------------------

    0:              0      0      0      0      0      0     56     56     56

   10:      56     56     56     56      0      0      0      0      0      0

   20:      56     56     56     56     56     56     56      0      0      0

   30:      18     56     56     56     56     48     48     48     48      0

   40:       0     56     56     56      0     56     56

  

 

The row headers correspond to each tenth of a column in a data file

while the column headers correspond to a single column. For example,

if you want to know how many non-blank characters there are in column

13 of a data file, go to the value that matches with row "10", column

"3". The value is 56. For column 38, the number of non-blank characters

is 48.

 

 

 

 

 

V. KNOWN ISSUES

 

If a data file is missing carriage returns in a record, it will likely

cause the program to report errors that may not be true for the rest of

the data file being checked. If this occurs, double check that the number

of bytes in a record matches what the label is specifying.

 

Table checker has a slow processing time when checking large table files.

 

 

 

 

 

APPENDIX A. ERROR CODES

 

When in batch mode processing, the following table lists the error codes

and an error message description:

 

 

NOTE: The error messages listed below will still appear under non-batch

      mode processing. Only difference is that the error code will be

      omitted from the report.

 

------------

LABEL ERRORS

------------

 

ERROR CODE            DESCRIPTION

==========            ===========

101                   Column number out of sequence

102                   DERIVED_MAXIMUM/DERIVED_MINIMUM in non-numeric

                      field

103                   Misplaced END_OBJECT statement

104                   Repetition count in a FORMAT value does not match

                      number of items in the column

105                   SPARE columns does not have a DATA_TYPE of CHARACTER

106                   Number of columns specified in the label does not

                      match the number of column objects found

107                   A container extends past the end of row

108                   Maximum value is less than the minimum value

109                   Valid maximum value is less than the valid minimum

                      value

110                   Derived maximum value is less than the derived

                      minimum value

111                   Container object contains no keywords

112                   A data field that extends past the end of a column object

113                   FORMAT value is too big

114                   FORMAT value is incompatible with the DATA TYPE specified

115                   A single data file contains both MSB and LSB integers

116                   Invalid character in file name

117                   Invalid FILE_RECORDS value

118                   Invalid FORMAT value

119                   Invalid number of bytes for an INTEGER type

120                   Invalid number of bytes for a REAL type

121                   Invalid RECORD_BYTES value

122                   Invalid RECORD_TYPE value

123                   Invalid REPETITIONS value in a container object

125                   Total width of ITEMS exceeds BYTE value

126                   Maximum value overflows the field

127                   Minimum value overflows the field

128                   No pointer found for an object

129                   DERIVED MAXIMUM/MINIMUM value specified without an                 

                      OFFSET or SCALING_FACTOR value

130                   Mixed cases are found in file name

131                   File name contains multiple extensions

132                   File name is missing an extension

133                   FILE_RECORDS keyword not found

134                   RECORD_BYTES keyword not found

135                   RECORD_TYPE keyword not found

136                   FORMAT value does not include repetition count

                      for a column object with items

137                   No table objects found

139                   An obsolete keyword was found

140                   An obsolete data type was found

141                   Unable to open a file

142                   Field precision exceeds its width

143                   Underscores used within quotes

144                   ROW_BYTES and RECORD_BYTES values do not match

                      in a FIXED_LENGTH record file

145                   SCALING_FACTOR value equals 0

146                   START_BYTE value is less than 1

147                   START_BYTE value is greater than BYTES of its

                      parent object

148                   START_BYTE value is greater than ROW_BYTES of

                      the table

149                   Maximum string is less than minimum string

150                   Valid maximum string is less than valid minimum string

151                   Unexpected END found in label

152                   Unexpected end of file

153                   Column has no name

154                   Container has no name

155                   Value overflows the field

156                   Field width exceeds byte count of column

157                   Field width is greater than maximum DATE size

158                   Field width is greater than maximum TIME size

159                   Field width does not span the field

160                   Field width is less than the minimum DATE size

161                   Field width is less than the minimum TIME size

 

 

----------------

DATA FILE ERRORS

----------------

 

ERROR CODE            DESCRIPTION

==========            ===========

201                   Data file not found

202                   Unable to set file pointer to indicated offset

203                   A certain error has been reported more than 10 times

205                   Number of table rows read does not match ROWS value in the label

 

 

-----------------

DATA FIELD ERRORS

-----------------

 

ERROR CODE            DESCRIPTION

==========            ===========

0                     Value greater than MAXIMUM                                         

1                     Value less than MINIMUM                                            

2                     Adjusted value greater than DERIVED_MAXIMUM                        

3                     Adjusted value less than DERIVED_MINIMUM                           

4                     Value greater than VALID_MAXIMUM                                   

5                     Value less than VALID_MINIMUM                                      

6                     Not a valid integer                                                

7                     Not a valid real number                                            

8                     Non-printing character in CHARACTER field                           

9                     Record length not equal to RECORD_BYTES                            

10                    Record does not have carriage-return (\r)                          

11                    'E' format field does not have an exponent                         

12                    'F' format field decimal point does not align with precision value 

13                    'I' format field is not right-justified                            

14                    Blank field                                                         

15                    Invalid DATE field (expecting YYYY-MM-DD)                          

16                    Invalid TIME format (expecting YYYY-MM-DDThh:mm:ss[.sss][Z]