Dec 212017
Complete cross-reference of database used inside .ntx files.
File NTX.ZIP from The Programmer’s Corner in
Category Dbase Source Code
Complete cross-reference of database used inside .ntx files.
File Name File Size Zip Size Zip Type
LISTNTX.EXE 184336 83561 deflated
LISTNTX.PRG 2449 1050 deflated
NTX.LST 318 87 deflated
NTXCAT.EXE 183872 83316 deflated
NTXCAT.PRG 1939 946 deflated
NTXFUNC.PRG 1543 704 deflated
READ.ME 3144 1356 deflated
UDFS.PRG 1795 798 deflated

Download File NTX.ZIP Here

Contents of the READ.ME file

The zip file :NTX.ZIP should contain the following files:
NTXFUNC.PRG - source for user-defined function FNTXCAT
NTXCAT.EXE - executable version of index catalogue program
LISTNTX.EXE - executable version of index catalogue listing program
UDFS.PRG - source for 2(two) user-defined functions I use in these programs
NTX.LST - sample output file from LISTNTX
READ.ME - this file

This program was designed to aid the system developer & administrator
of Clipper based systems. The problem is that when you have multiple index
files for each database in your system, it is hard to tell what database the
index is associated with. Neither Clipper or Dbase includes the database name
used in the actual index file.

After examining the problem, I came up with the following solution. The
first 1024 bytes in all .ntx files is used to store the index expression as
well as some proprietary information unknown to myself. The actual index
information does not start until byte 1025. After careful testing, I
determined that the 16 bytes prior to 1025,1008 thru 1024, were a safe place
to store some additional information. What NTXCAT actually does is replace bytes
1008 thru 1015 with a database file name.

The program starts by reading a directory of all .ntx files in the current
directory. It then presents each file name, one at a time, and prompts for a
database name to be inserted into that .ntx file. This works just fine for an
initial start of the cataloging process. However, whenever you index or re-index
this information is lost, since Clipper rewrites the index file on top of the
old one.

This is where the user-defined function FNTXCAT comes in. The idea is that
everywhere in your program where you do an index or re-index you should then
call this function which will insert the database name in the index file.

Now, you may wonder, that I have a database file name in the index file
what I am going to do with it? Well, thats where LISTNTX.EXE comes in. Basically
that program will read all .ntx files in the current directory and create a text
file showing:index file name, index expression, & database name inserted by
NTXCAT. You are prompted for the file name on program execution. This text file
may then be viewed or printed out at your discretion.

This is one of my first attempts at writing a major utility for Clipper
systems and therefore do not imply any expertise on the subject. Even though I
have tested this program thouroughly, I cannot guarentee any results. However,
I would appreciate any feedback, good or bad, on this idea. I can be reached by
electonic mail at any of the following places:

Contech BBS - (301)340-2212
Programmers Corner - (301)995-3744
Cbug BBS - (301)730-5624
Compuserve - 73257,1737

Good Luck & Happy Clippering!

Gary Blatt

 December 21, 2017  Add comments

Leave a Reply