ddlGetIndexData(), ddlGetIndexDataNext(), ddlGetIndexDataPrevious() Prototype: ddlGetIndexData( CONTROL *ctl, char *OptnString, char *ArgString, long BufferByteCount, /* the size of buffer in bytes */ char *Buffer); Structure used by ddlGetIndexData(): typedef struct INDEXDATASTRUCT{ short IndexItemStructSize; /* [OUT] total number of bytes in this */ /* structure element, including data */ short IndexItemNullFlag; /* [IN]/[OUT] 0 - item is not null */ /* 1 - item is null */ long IndexItemCount; /* [OUT] this is the returned count */ char IndexItemData[4]; /* [IN]/[OUT] place holder for data */ }INDEXDATASTRUCT; Possible values for OptnString: NA Format of ArgString: <IndexName> [<RD-Name>] [[-]<Starting Position>] where <IndexName> is the name of the Thunderbolt Key <RD-Name> is an optional name of an RD that describes the format for delivering the index data to Buffer; if <Rd-Name> is not present, the index data is delivered in its native format; if <Rd-Name> is present, the index data is delivered in its native format, followed by the RD-specified format; <Starting Position> is an optional ascii numeric field; between 0 and 100.0 denoting the approximate starting position; Special values for <Starting Position> are: 0 - [default] start at the beginning and read forward; 100.0 - start at the end and read backward; Definition of BufferByteCount: This is the total number of bytes in Buffer. Items will be read until Buffer is full. Definition of Buffer: In this API function, Buffer is used only for output. The result INDEXDATASTRUCT{} items are always returned in ascending order. Thus, if the index was read backward, the starting item is the last item in Buffer, rather than the first. Values returned in CONTROL structure: ctl.Ans1 - total number of items returned Description: The ddlGetIndexData() API function, and its ancillary functions ddlGetIndexDataNext() and ddlGetIndexDataPrevious() are special functions that will facilitate the retrieval of index data for the purpose of Data Profiling. Note however, that in the general case, the data type and size of index data is not the same as the data type and size of the underlying field. Field type Key type Alpha Alpha Date Alpha Numeric (n <=9, d = 0) Long Int Numeric (n <=6) Float Numeric (n > 6) Double Short Int Long Int Long Int Long Int Long Int 64 Long Int 64 Logical Long Int Float Float Double Double The ddlVerify() ... SIGNATURE function modifiers: SIGNATURE dgname fieldname KEYTYPE SIGNATURE dgname fieldname KEYLENGTH can be used to retrieve this information in a generic manner. Prototype: ddlGetIndexDataNext( CONTROL *ctl, char *OptnString, char *ArgString, long BufferByteCount, /* the size of buffer in bytes */ char *Buffer); Possible values for OptnString: /I - Include the node for the starting position, if it exists /L - Use Low Value for starting position; that is, ignore the incoming value in Buffer; and start at the first node; /I is implied with this option Format of ArgString: <IndexName> [<RD-Name>] where <IndexName> is the name of the Thunderbolt Key Definition of BufferByteCount: This is the total number of bytes in Buffer. Items will be read until Buffer is full. Definition of Buffer: In this API function, the first item in Buffer is used as the starting position. Items are read following the starting position until Buffer is full or until there is no more data. Values returned in CONTROL structure: ctl.Ans1 - total number of items returned Prototype: ddlGetIndexDataPrevious( CONTROL *ctl, char *OptnString, char *ArgString, long BufferByteCount, /* the size of buffer in bytes */ char *Buffer); Possible values for OptnString: /H - Use High Value for starting position; that is, ignore the incoming value in Buffer; and start at the last node; /I is implied with this option /I - Include the node for the starting position, if it exists Format of ArgString: <IndexName> [<RD-Name>] where <IndexName> is the name of the Thunderbolt Key Definition of BufferByteCount: This is the total number of bytes in Buffer. Items will be read until Buffer is full. Definition of Buffer: In this API function, the first item in Buffer is used as the starting position. Items are read preceeding the starting position until Buffer is full or until there is no more data. The result INDEXDATASTRUCT{} items are always returned in ascending order. Thus, if the index was read backward, the starting item is the last item in Buffer, rather than the first. Values returned in CONTROL structure: ctl.Ans1 - total number of items returned
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.