Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!pacbell.com!iggy.GW.Vitalink.COM!widener!dsinc!netnews.upenn.edu!msuinfo!cpsin2.cps.msu.edu!cushman From: cushman@cpsin2.cps.msu.edu (Roderick J Cushman) Newsgroups: comp.databases Subject: Re: So does Clipper do it ? Keywords: Clipper Index gauge, .NTX file, dbCreatIndex() Message-ID: <1991May24.180404.18538@msuinfo.cl.msu.edu> Date: 24 May 91 18:04:04 GMT References: <1991May23.182713.5914@beach.csulb.edu> <29737@hydra.gatech.EDU> <1991May24.173628.15324@msuinfo.cl.msu.edu> Sender: news@msuinfo.cl.msu.edu Reply-To: cushman@cpsin2.cps.msu.edu (Roderick J Cushman) Organization: Dept. of Computer Science, Michigan State University Lines: 74 Originator: cushman@cpsin2.cps.msu.edu In article <1991May24.173628.15324@msuinfo.cl.msu.edu> cushman@frith.cps.msu.edu (PUT YOUR NAME HERE) writes: > ... NULL posting; please accept my apology... The following is what I >> intended to post... Hi: (I apologize for the previous NULL posting) After perusing multiple articles discussing the usage of an index gauge (and reading the methods used), I thought I would attempt to shed some light (or more mud ???) upon the subject. Internal to Clipper version 5.0 (and I believe it is now documented in version 5.01) is a function called dbCreatIndex() (spelling ??). I would have to look up the actual spelling of the function; it can be found if you pre-process your code, then observe the .PPO file relevant to the INDEX ON to file. The parameters to the function are as follows: dbCreatIndex( cFileName, cFileExpr, bCreatExpr, lUniqflag) cFileName: The name of the .NTX file to be created cFileExpr: The expression to be placed in the index (.NTX) file header. bCreatExpr: a code block (similar to cFileExpr) which is used to create the index tables. lUniqFlag: a logical parameter which indicates to the internal function whether the user wished to INDEX ON to FILE UNIQUE ^^^^^^ If you examine the preprocessed code, the lUniqFlag parameter is an interesting if(...) conditional. I am not sure why this was implemented in this manner, but a simple .T. or .F. value will suffice. You can pass to the .NTX file the expression (minus any display function calls), and pass to the code block the same expression, appended with any display function calls the user wishes. I tried to implement a BARCHART() routine, provided by either Rick Spence or Steven Straley & Assoc. (I cannot recall which book I derived it from) in Summer '87. Like the other messages I have read, using this feature in Summer '87 is a precarious position to uphold. With the new versions (5.0*), seperating the code block from the file expression allows the programmer to cleanly perform video output of graphs, percentages, etc. Incidently, I have implemented the above code, deriving the params from a database (containing filenames, expressions, code blocks, unique flags, etc) and a revised function originated from the people at Nantucket's tech support (theirs required a fixed position, color, etc.). If anyone would like to see it, I could post a sample of it on the net (or email it individually). I am a graduating student at this university (Michigan State U.) on June 8th. I am not sure how long I will still be able to use this account after that. I can be reached via the following office Rod Cushman W26 Holmes Hall Michigan State University East Lansing, MI, 48823 if I cannot be contacted via the net... There is more information regarding indexxing, but, alas, I must be off to work... Rod.