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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to copy index structure text File ?

Status
Not open for further replies.

COBART

MIS
Sep 7, 2000
33
ID
Hallo every body, I need your advise !
I have lot of table. and i don't remember the index tag.
If the index file is broken I can't create index file again

How to copy structure index file and Tag to text file ?


Thanks
Regards

Rudi
 
Rudi

Try Thread184-30457 and Thread184-31035

Through Windows Explorer search for and examine GENDBC.prg.

Chris
 
Hallo chris !
Can you help me this problem ?
you can give me code program please !

Thank's a lot
Rudi




 
Rudi

The following code is from thread184-31035 and will generate the information you require.
It is NOT suitable for a database.

CREA TABLE cdx_tags ;
[tab](Work_area N(5) ,;
[tab]Table_name M ,;
[tab]Tag_name C(10) ,;
[tab]Expression M ,;
[tab]Filter M ,;
[tab]Descending C(10) ,;
[tab]Tag_type C(10) ,;
[tab]Index_on M)

FOR lnTableNo = 1 TO 32767
[tab]IF !EMPTY(SELECT(lnTableNo)) && Checks for open tables
[tab][tab]SELE (lnTableNo)
[tab][tab]FOR lnCount = 1 TO TAGCOUNT()
[tab][tab][tab]IF !EMPTY(TAG(lnCount)) && Checks for index tags
[tab][tab][tab][tab]
[tab][tab][tab][tab]APPE BLAN IN CDX_TAGS
[tab][tab][tab][tab]REPLACE CDX_TAGS.work_area WITH SELECT(),;
[tab][tab][tab][tab]CDX_TAGS.table_name WITH ALIAS[(lnTableNo)],;
[tab][tab][tab][tab]CDX_TAGS.tag_name WITH TAG(lnCount),;
[tab][tab][tab][tab]CDX_TAGS.expression WITH SYS(14,lnCount),;
[tab][tab][tab][tab]CDX_TAGS.filter WITH SYS(2021,lnCount)

[tab][tab][tab][tab]IF DESCENDING(lnCount)
[tab][tab][tab][tab][tab]REPLACE CDX_TAGS.Descending WITH [DESCENDING]
[tab][tab][tab][tab]ENDIF

[tab][tab][tab][tab]DO CASE
[tab][tab][tab][tab]CASE UNIQUE(lnCount)
[tab][tab][tab][tab][tab]REPLACE CDX_TAGS.Tag_type WITH [UNIQUE]
[tab][tab][tab][tab]CASE CANDIDATE(lnCount)
[tab][tab][tab][tab][tab]REPLACE CDX_TAGS.Tag_type WITH [CANDIDATE]
[tab][tab][tab][tab]ENDCASE

[tab][tab][tab][tab]REPLACE CDX_TAGS.index_on WITH [INDEX ON ];
[tab][tab][tab][tab]+ALLTRIM(CDX_TAGS.expression);
[tab][tab][tab][tab]+[ TAG ];
[tab][tab][tab][tab]+ALLTRIM(CDX_TAGS.tag_name);
[tab][tab][tab][tab]+[ ];
[tab][tab][tab][tab]+ALLTRIM(CDX_TAGS.Filter);
[tab][tab][tab][tab]+[ ];
[tab][tab][tab][tab]+ALLTRIM(CDX_TAGS.Descending);
[tab][tab][tab][tab]+[ ];
[tab][tab][tab][tab]+ALLTRIM(CDX_TAGS.Tag_type)
[tab][tab][tab]ELSE
[tab][tab][tab][tab]EXIT && Exit the loop when no more tags are found
[tab][tab][tab]ENDIF
[tab][tab]ENDFOR
[tab]ELSE
[tab][tab]EXIT && Exit the loop when no more tables are found
[tab]ENDIF
ENDFOR

SELE CDX_TAGS
BROW


The expressions for each tag may be found in the memo field CDX_TAGS.Index_on.




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top