CHECK Command Display

Topics:

Reference:

If your Master File contains syntactical errors, the CHECK command displays appropriate messages.

Reference: CHECK FILE Command Output

If the data source description has no syntactical errors, the CHECK command displays the following message

NUMBER OF ERRORS=     0
NUMBER OF SEGMENTS=   n  ( REAL=    n VIRTUAL=    n )
NUMBER OF FIELDS=     n  INDEXES=   n FILES=      n 
NUMBER OF DEFINES=    n 
TOTAL LENGTH OF ALL FIELDS=  n

where:

NUMBER OF ERRORS

Indicates the number of syntactical errors in the Master File.

NUMBER OF SEGMENTS

Is the number of segments in the Master File, including cross-referenced segments.

REAL

Is the number of segments that are not cross-referenced. These segments have types Sn, SHn, U, or blank.

VIRTUAL

Is the number of segments that are cross-referenced. These segments have types KU, KLU, KM, KL, DKU, or DKM.

NUMBER OF FIELDS

Is the number of fields described in the Master File.

INDEXES

Is the number of indexed fields. These fields have the attribute FIELDTYPE=I or INDEX=I in the Master File.

FILES

Is the number of data sources containing the fields.

NUMBER OF DEFINES

Is the number of virtual fields in the Master File. This message appears only if virtual fields are defined.

TOTAL LENGTH

Is the total length of all fields as defined in the Master File by either the FORMAT attribute (if the data source is a FOCUS data source) or the ACTUAL attribute (if the data source is a non-FOCUS data source).

Example: Using the CHECK File Command

Entering the following command

CHECK FILE EMPLOYEE

produces the following information:

NUMBER OF ERRORS=     0
NUMBER OF SEGMENTS=  11     ( REAL=   6 VIRTUAL=  5 )
NUMBER OF FIELDS=    34     INDEXES=  0 FILES=    3
TOTAL LENGTH OF ALL FIELDS = 365

Determining Common Errors

  • If the data source is a non-FOCUS data source, check the TOTAL LENGTH OF ALL FIELDS to verify the accuracy of the field lengths specified. One of the most common causes of errors in generating reports from non-FOCUS data sources is incorrectly specified field lengths. The total length of all fields should be equal to the logical record length of the non-FOCUS data source.

    In general, if the total length of all fields is not equal to the logical record length of the non-FOCUS data source, the length of at least one field is specified incorrectly. Your external data may not be read correctly if you do not correct the error.

  • If the following warning message is generated, duplicate fields (those having the same field names and aliases) are not allowed in the same segment. The second occurrence is never accessed.
    (FOC1829) WARNING. FIELDNAME IS NOT UNIQUE WITHIN A SEGMENT: fieldname

    When the CHECK command is issued for a data source with more than one field of the same name in the same segment, a FOC1829 message is generated along with a warning such as the following indicating that the duplicate fields cannot be accessed:

    (FOC1829) WARNING. FIELDNAME IS NOT UNIQUE WITHIN A SEGMENT: BB
    WARNING: FOLLOWING FIELDS CANNOT BE ACCESSED
    BB  IN SEGMENT SEGA        (VS SEGB

    When the DUPLICATE option is added, the output contains a warning message that indicates where the first duplicate field resides:

    WARNING: FOLLOWING FIELDS APPEAR MORE THAN ONCE
    AA IN SEGMENT SEGB        (VS SEGA)

WebFOCUS

Feedback