Displaying information about a keyed file

kfdet

Display information about a keyed file


SYNTAX

kfdet [-hv][-F tempfile] filename [filename]…

Displays information about the key length, record length and number of index levels of a Sculptor keyed file and of any secondary indexes associated with it. The information is normally output to the screen but may be redirected to a file or to a printer.

The number of index levels indicates the ‘depth’ of the index tree. This determines the maximum number of logical disk reads which are required to access a record from this file. The number of index levels depends on the size of the key, the number of records in the file and the order in which the records were inserted.

filename

Each filename should be the name of a Sculptor file. The path should be included if the file is not located in the current working directory. The index file (.k extension) and data file (no extension) must both be present. The .k extension may, optionally, be included in the filename.

[-hv]
-F tempfile

Command line options.

-F tempfile

Places all messages that would normally be displayed on the terminal in the named file and suppresses all questions.

-h

Display a help screen listing these options. No other action is taken.

-v

Display version information. No other action is taken.


Output

The output of kfdet takes the form:

filename
Key length = nnn
Record length = nnn
Number of index levels = nnn

INDEX : name (filename)
Key length = nnn
Record length = nnn
Number of index levels = nnn
….

Error messages

File is damaged

The header record of the specified index file did not contain valid data. Use kfcheck to report on the integrity of the file. If damage is reported, rebuild the index with the kfri program.


Filename too long

The file name exceeds the program’s limits for file and/or path names.


System error nnn reading filename

Operating system error number nnn occurred when reading the index file. Check your operating system manual for further details. A typical cause of this event is incorrect permissions.


EXAMPLES

  1. Report on all files in current directory, placing output in file “tmpdet”:

    kfdet -F tmpdet *.k
    
  2. Simple info report on single file:

    kfdet codefile
    

RELATED TOPICS

Keyed file utilities

Sculptor keyed files

Data dictionary editor

kfcheck

kfri