************************************** ** ** Function : GetIndexExpr ** Purpose : Creates list of index expression of a table ** Params : cTable (character) - table name ** Programmer : Jess S. Banaga ** Date Started: 03/02/2000 ** Modified : 03/20/2000 - to accomodate multi-table structure printing ** ** Syntax : Old - GetIndexExpr('tablename.dbf') ** New - GetIndexExpr() ** ************************************** ** Get table name gcTable = GETFILE('DBF','Create Index Expression File','Create File') IF !EMPTY(gcTable) ** invoke procedure to get index expression DO GetExpr WITH SUBSTR(gcTable,1,RAT('.',gctable)) ELSE ** specify directory folder to scan gcDIR = GETDIR(FULLPATH(''),'Directory Table') IF !EMPTY(gcDIR) ** assign table list to array variable nCntr = ADIR(cTableFile,'*.DBF') ** scan array variable FOR i = 1 TO nCntr gcTable = cTableFile(i,1) ** invoke procedure to get index expression DO GetExpr WITH gcTable ENDFOR ENDIF ENDIF CLOSE ALL RETURN ************************************** ** End fo program GetIndexExpr ** Date Finished : 03/02/2000 ************************************** ************************************** ** Procedure : GetExpr ** Purpose : Creates Text File ** Params : cTable - Table Name ************************************** PROCEDURE GetExpr ( cTable ) cFile = ctable+'.txt' SET DEVICE TO FILE &cFile @PROW(),00 SAY 'TABLE NAME : '+cTable @PROW(),00 SAY ' ' @PROW(),00 SAY 'INDEX TAG NAME INDEX EXPRESSION' @PROW(),00 SAY '-------------------- -------------------------------------------------' FOR i = 1 TO TAGCOUNT() ** GET index tab cIndexTag = ALLT(TAG(ctable,i,ctable)) ** GET INDEX EXPRESSION cIndexExpr = ALLT(SYS(14,i,ctable)) @PROW(),00 SAY cIndexTag @PROW(),20 SAY cIndexExpr ENDFOR ** Look the output now modi comm (ctable) noedit USE IN (cTable) SET DEVICE TO SCREENHTH