Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>ordcreate():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  OrdCreate():

  Syntax:   OrdCreate( [<cIndexFile>] [, <cOrderName>], <cExpKey>, ;
                       [<bExpKey>], [<lUnique>] )

       cIndexFile = The name of the index file containing one or more Orders.
                    You may specify <cIndexFile> as the filename with or
                    without the path name or extension.  If you do not inc-
                    lude the extension as part of <cIndexFile>, the default
                    extension of the currently active RDD is assumed.

       cOrderName = The name of the Order (or tag) to be created.

         NOTE:  Although <cIndexFile> and <cOrderName> are both optional,
                at least one of them must be specified.

       cExpKey = An expression that returns the key value to place in the
                 Order for each record in the current work area.  <cExpKey>
                 can represent a character, date, logical, or numeric data
                 type.  The maximum length of the index key expression is
                 determined by the database driver.

       bExpKey = An optional code block that evaluates to a key value that is
                 placed in the Order for each record in the current work area.
                 If you do not supply <bExpKey>, it is macro-compiled from
                 <cExpKey>.

       lUnique = An optional logical value that specifies whether a unique
                 Order is to be created.  If <lUnique> is omitted, the cur-
                 rent global _SET_UNIQUE setting is used.

  Returns:  NIL

  Description:

     OrdCreate() is an Order management function that creates an Order in the
     current work area.  It works like dbCreateIndex() except that it lets
     you create Orders in RDDs that recognize multiple-Order Bags, like the
     SIXCDX and SIXNSX drivers.  OrdCreate() supersedes the dbCreateIndex()
     function because of this capability, and is the preferred function.

     In RDDs that support production or structural indexes (e.g., SIXCDX,
     SIXNSX), if you specify a Tag but do not specify an Order Bag, the Tag
     is created and added to the index.  If no production or structural index
     exists, it will be created and the Tag will be added to it.  When using
     RDDs that support multiple Order Bags, you must explicitly SET ORDER (or
     OrdSetFocus()) to the desired controlling Order.  If you do not specify
     a controlling Order, the data file will be viewed in natural Order.

     If <cIndexFile> does not exist, it is created in accordance with the
     RDD in the current or specified work area.

     If <cIndexFile> exists and the RDD specifies that Order Bags can only
     contain a single Order, <cIndexFile> is erased and the new Order is
     added to the Order List in the current or specified work area.

     If <cIndexFile> exists and the RDD specifies that Order Bags can
     contain multiple Tags, <cOrderName> is created if it does not already
     exist, otherwise <cOrderName> is replaced in <cIndexFile> and the
     Order is added to the Order List in the current or specified work area.

  Example:

     // Using SIXNTX
     USE test VIA "SIXNTX"
     OrdCreate( "LAST.NTX", "LAST", "test->LAST", {|| test->LAST } )

     // Using SIXCDX, creating a tag called LAST in TEST.CDX
     USE test VIA "SIXCDX"
     OrdCreate( "TEST.CDX", "LAST", "test->LAST", {|| test->LAST } )


See Also: INDEX

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