Home page  
Help >
ddlStructureMem() - create structure for UDI field(s)
Version 7.11
ddlStructureMem() - create structure for UDI field(s) ddlStructureMem() - create structure for UDI field(s)

ddlStructureMem() is used to create User Defined Indexes, or UDIs. It can create structures for initial build and for incremental build.
Prototype:

   void ddlStructureMem(
      CONTROL *ctl,
      char *OptnStr,
      char *ArgList,           /* command argument list */
      long ItemCount,
      char *MemBlock);
Permitted values in OptnStr:
/B - the /B option indicates that the input meta file is in block format; in block format:
          a) each record must be the same length as the record size of the RD;
          b) there are no CR-LF record delimiters;
       Block format is required if the RD, or the data itself, contains any binary data types;
/D - The /D option must be used when structuring a DATA index.
       To delete an item from a DATA index, set the high-order bit of the <recno> field [0x80000000].
       In this case, <recno> is the DATA data value.
       Indexes built the the /D option can be queried only with the ddlFindCxData().
/E - continue processing if error occurs; reference Description of Parameter StatusList below;
/F - blank fill ascii fields that contain the null character;
Form of ArgList:
<key-name> USING <RdName> <recno-field> <table-field> [<data-field>]
<key-name> represents the target key name;
<RdName> represents the name of the RD that describes each record in MemBlock.
<recno-field> represents the name of a field in <RdName> that contains the index record number;
<table-field> represents the name of a field in <RdName> that contains the index table name;
       alternately, this field can contain the literal table name [enclosed in 's];
<data-field> represents the name of a field in <RdName> that contains the index data;

Description:
ddlStructureMem() is an index maintenance function for User Defined Indexes, or UDIs.

Although UDI does not require a connection to literal data in the underlying database, it does require a connection to a literal record.

Description of Parameter ItemCount:
long ItemCount is the number of items being submitted; each item is represented by an item in <MemBlock>.

Description of Parameter MemBlock:
char *MemBlock is a buffer containing ItemCount record images; each of whose contents and length are defined by the Record Description <RdName>. If any element of the data contains binary data, [i.e., the <recno-field>, the <table-field> or the <data-field>], then block format is required; otherwise, block format is optional.


Value returned in Control.Ans1:
      Incoming ItemCount
Value returned in Control.Ans2:
      Number of items processed

Notes:
Note 1 The data required to build a UDI index is:
   a field containing the 1-relative index record number;
   a field containing the index table name;
   a field containing the index data;
Note 2 For both ddlStructureMem() and for the related API function ddlStructure() Form4 and Form6, block format is required if the data contains binary data; otherwise, block format is optional.

Copyright © 2019 , WhamTech, Inc.  All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. Names may be trademarks of their respective owners.