Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Advantage CA-Clipper Guide v5.5 - set order to tag http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SET ORDER TO TAG
 Select a tag within a .cdx file to be the controlling order
------------------------------------------------------------------------------

 Syntax

     SET ORDER TO TAG [<cTagName> [IN <cCDXName>]]

     <cTagName> identifies the tag to which the order is to be set.

     <cCDXName> specifies which .cdx file contains the specified tag.
     If a .cdx file is not specified, the open .cdx indexes are searched
     for the tag in the order they were opened.

 Description

     SET ORDER TO TAG allows the user to select a tag within a .cdx file
     to be the controlling order.  Once the tag is found, the order is set
     to the .cdx file, and control is given to the specified tag. If
     <cCDXName> is specified, then only that index file is searched for
     the specified tag name.

     If <cCDXName> is not specified in CA-Clipper 5.01, the structural
     .cdx is searched, followed by the active .cdx files in the order by
     which they were opened.  CA-Clipper 5.2 searches the active .cdx
     files in the order they were opened.

 Example

     #include "DBFCDXAX.CH"

     // Assume TEST.DBF has a TEST.CDX file with tags AGE and STATE

     USE test VIA "DBFCDXAX"       // Open TEST.DBF and TEST.CDX

     SET ORDER TO TAG age          // Selects the AGE tag

     // Create a new Last.idx file.  This makes Last.idx
     // the active order and pushes test.cdx to the end
     // of the order (in this case order 2).
     INDEX ON last to last

     // Select TEST.CDX which still has the AGE tag active.
     SET ORDER TO TAG age

     // Select the STATE tag, and set the order to the
     // TEST.CDX file since it includes the STATE tag
     SET ORDER TO TAG state

     // Select Last.idx which is in order 1
     SET ORDER TO TAG last


See Also: SET TAG AX_SetTag() AX_SetTagNo()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson