Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INDEX ON .... COMPACT FOR EMPTY(varname) 1

Status
Not open for further replies.

sjpistolesi

Programmer
Jun 6, 2002
71
US
Need help understanding the subject command. What would be the result when using "INDEX ON" .... "COMPACT ON EMPTY(varname)" combined in the same statement/command??

Trying to comprehend the meaning of this legacy code.

Thanks,
Sandy
 
What version/RDD of Clipper is this to be compiled with?

TIA
TonHu
 
Well,

The 5.1 prob. means 5.01, but that hardly matters in this case.
AFAIK, the "compact on empty (varname)" frase is not std. Clipper syntax, which lead me to ask for the Clipper version and/or RDD involved.
So, either this is an add-on RDD that's used, but that's hardly possible with 5.01, or your code is actually FoxPro code, and won't be able to be compiled with Clipper.
If you strip off the compact... bit it should compile, and also would work on FoxPro, unless program logic is dependent on this special index technique.

Clipper 5.2e has a very complete and stable DBFCDX RDD, that does index compaction/compression by default, if indexsize is of concern, but with current HDD sizes, who cares?

HTH
TonHu

P.s. Please inform me if I'm completely off-track here... ;-)
 
Hi TonHu, "Who cares" ... I do; I'm in the middle of reengineering a legacy system into a different environment. When I do such translations, I endeavor to ensure the original logic is supported in one fashion or another, depending on the capabilities of the new environment.

As it happens, though, the clues provided by sboomer tipped me to the fact I was reading an original FOXPRO coded program, not CLIPPER. [Thank You, sboomer .]

Success: In this brief exchange, I've acquired the clues needed to intrepret the original intent of the programmer who authored the subroutine I'm stepping through, line by line.

In this statement, he intended that only those records which met the Empty(varname) criterion would be accessible in the index, similar to a filtering routing. Further, that the Index would be a compact .IDX file. It was the result I was seeking to comprehend.

Thanks so much ... pressing on,
Sandy
 
Ah, that's why Clipper uses the more generic
Code:
WHERE EMPTY(VARNAME)
clause on the index statement, so after all, it's 'compatible', but just not exactly on the source level.

HTH
TonHu
 
Hi TonHu,

Yup, and when reengineering a system into another environment, I need to ensure the selection is emulated correctly. Now comprehending the true intent of the old code, I am proceeding in the newer environment, ensuring the selection criterion is accurate, albeit a different syntax. (That way my clients will trust the newer system.)

Thanks, Cheers, and Happy New Year,
Sandy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top