Home page  
Help >
ddlMode() - MODE
Version 7.11
ddlMode() - MODE ddlMode() - MODE

Prototype:

   void ddlMode(
      CONTROL *ctl,
      char *OptnStr,
      char *ArgList);
Notation standards Options Answers

Permitted values in OptnStr: NA

Form of ArgList1:
      <function> [<function-parameters>]

<function> and <function-parameters> are described in the following section.

Values returned in Control Structure:
Control.Ans1str[] If <function-parameters> are not specified, Control.Ans1str[] contains the current <function> and <function-parameters>.
If <function-parameters> are specified, Control.Ans1str[] contains the new <function> and <function-parameters>.

Syntax:
Form 1: AUTOINCR [{ON,OFF}]
Form 2: BUFFERS <buff-count> <sort-buff-size> <sort-buff-count>
Form 3: CENTURY [{OFF | <nn>}]
Form 4: CPUSTAT [n]
Form 5: DATEFORM [RESET] <data-type> [<template>]
Form 6: DEBUG [n]
Form 7: MEMCOLL [nnnnn]
Form 8: MEMSTAT [nnnnn]
Form 9: NOCACHE [ON/OFF]
Form 10: SEQUENTIAL [OFF] | [nn]
Form 11: TABSTOP [OFF | T1,T2,...Tn]
Form 12: TEMP [<temp-path-1>[;<temp-path-2>]]
Form 13: TEMPLIMIT [<tempFileLimitMB>]
Form 14: TOKENMAP [{ON,OFF}]
Form 15: TRACE [{ON,OFF}]
Form 16: TRACKER [{ON,OFF}]

Form 1: AUTOINCR [{ON,OFF}]
AUTOINCR ON enables the Auto Increment feature for all keyed fields that have the IDENTITY modifier. AUTOINCR ON is the default setting.
AUTOINCR OFF disables the Auto Increment feature for all keyed fields that have the IDENTITY modifier.

Refer to the IDENTITY modifier for a description of the Auto Increment feature.
Form 2: BUFFERS <buff-count> <sort-buff-size> <sort-buff-count>
[Incomplete]
Specifies the configuration for the basic buffer pool.
<buff-count> is the number of data buffers in the buffer pool.
<sort-buff-size> is the max sort buffer size expressed as multiples of 4096.
<sort-buff-count> is the max number of sort buffers to use.
The default BUFFERS configuration is 32 60 6.
numbers provide optimum performance. If you are tight on memory you can use a BUFFERS statement to reduce memory requirements, (e.g., BUFFERS 20 30 3 ), but reduce it no further than that. The cost of such a reduction is that it will degrade sort times by about 20 percent.
Form 3: CENTURY [{OFF | <nn>}]

Controls the conversion of dates with two digit years to dates with four digit years.

With MODE CENTURY OFF two digit dates are combined with the current century to produce four digit dates. This is the default setting. For example:
   • On or before Dec 31 1999, '01/01/99' is interpreted as '01/01/1999'
   • On or after Jan 1 2000, '01/01/99' is interpreted as '01/01/2099'

With MODE CENTURY nn, two digit dates that are greater than nn are combined with 1900; those that are less than or equal to nn are combined with 2000. For example, with MODE CENTURY 15
   • '01/01/70' is interpreted as '01/01/1970'
   • '01/01/02' is interpreted as '01/01/2002'
   • '01/01/15' is interpreted as '01/01/2015'
   • '01/01/16' is interpreted as '01/01/1916'

The MODE CENTURY conversion applies to:
   • jdate() function with two digit year template
   • jdate() function with four digit year template and two digit year data
   • LOAD of a DATE field with a two digit year template
   • LOAD of a DATE field with four digit year template and two digit year data
   • FIND of a DATE field with four digit year template and two digit year data

This conversion does not apply to dates that are stored as type X fields.
Form 4: CPUSTAT [n]
[Incomplete]
   CPUSTAT [n]
 
   n = max number of CPUs to use
 
   [n can be 2 on single CPU system for testing.]
 
   If the max number of CPUs to use is greater than 1, use multithreading
   when possible for CPU intensive processes.
 
   ctl->Ans1 - number of CPUs on system
   ctl->Ans2 - max number of CPUs to use; default is number of CPUs on system
Form 5: DATEFORM [RESET] <data-type> [<template>]
Syntax options:
   1) DATEFORM <data-type>
   2) DATEFORM <data-type> <template>
   3) DATEFORM RESET
   4) DATEFORM RESET <data-type>

<data-type> is either:
   DATE
   DATETIME
   DATETIMEEX(n)
   DATETIMEEX+Z(n)
   TIME(n)
   TIME+Z(n)

<template> is described in the Data Conversion Formats section.

Option 1) DATEFORM <data-type> returns the default template for <data-type> in ctl->Ans2str[].
Option 2) DATEFORM <data-type> <template> replaces the default template for <data-type> with <template>
   and returns the result in ctl->Ans2str[].
Option 3) DATEFORM RESET resets all default templates to their initial value.
Option 4) DATEFORM RESET <data-type> resets the default template for <data-type> to its initial value
   and returns the result in ctl->Ans2str[].
Form 6: DEBUG [n]
[Incomplete]
MODE DEBUG controls the display of debug information for TB API file IO. The parameter n is the bitwise OR of the component DEBUG attributes:
       Value 2 [0010b] - enable Advisory Callback when lock attempt blocks; this is the default setting;
       Value 1 [0001b] - enable trace for all file locking calls
       Value 4 [0100b] - enable trace for all file open, close, read, write, seek and delete calls
       Value 8 [1000b] - enable trace for all buffere manager calls;

For the debug version of ddlnt and ddtl, trace information is written to the WhamDiag window; for the release version of ddlnt and ddtl, trace information is written to a file named DdPrintYYMM.log in the EIQ Server Log Folder.

MODE DEBUG can produce voluminous amounts of information.
Form 7: MEMCOLL [nnnnn}
[Incomplete]
This function specifies the maximum MEMCOLL size for a collection. When the collection size exceeds nnnnn, it is converted automatically to a bitmap.
The minimum value for nnnnn is 1000.
The default setting for nnnnn is 10000.

A MEMCOLL collection is a well ordered memory based list of 32 bit integers. For relatively small collections, MEMCOLL collections make more efficient use of memory than memory based bitmaps [MBMs].
Form 8: MEMSTAT [nnnnn]
[Incomplete]
MODE MEMSTAT retrieves data from the Operating System of the total amount and the available amount of physical RAM.
It also retrieves data from TB API of the maximum amount of available physical RAM that can be used by the current instance of TB API.
And it also provides a mechanism for the user to modify the maximum amount of available physical RAM that can be used by the current instance of TB API.

The current algorithm for TB API 8.0.99X authorization of global memory is:
. The default is set to 75% of the Total Available Memory from Windows API GlobalMemoryStatus();
. The value can be overridden by using the ddlMode() MEMSTAT function;
. The TB Container object, which is used for MATCH, REDUCE, SHOW (from a collection) and DISTINCT will start with a memory based container object and continue using the memory based container object until the memory authorization is exceeded; at this time it will switch to a file based container object where the degree of performance degradation depends on the nature of the particular function. When this switch occurs, an advisory message is sent to the Advisory Callback (if it is defined) in the form "Switch container to File: ..."
. For SORT and RELATE (and RELATEX)
. If MODE BUFFERS has been executed, the second and third parameters are used to establish the maximum buffer configuration;
. If MODE BUFFERS has not been executed, the Global Memory Authorization value from the user specified MODE MEMSTAT, or the default value from MODE MEMSTAT, is used; however, these values are subject to an absolute minimum of 2400KB;
. For STRUCTURE
. The Global Memory Authorization value from the user specified MODE MEMSTAT, or the default value from MODE MEMSTAT, is used; however, these values are subject to an absolute minimum of 2400KB;

When called without a parameter, the "MEMSTAT" mode, the results are (in K bytes):
. ctl->Ans1 - Total Physical Memory from GlobalMemoryStatus();
. ctl->Ans2 - Total Available Memory from GlobalMemoryStatus();
. ctl->Ans3 - Current user MEMSTAT setting (if defined)

When called with a parameter, the "MEMSTAT nnnnn" mode, MEMSTAT sets the TB API Memory Authorization to nnnnn K bytes
Form 9: NOCACHE [ON/OFF]
MODE NOCACHE controls the usage of the FILE_FLAG_NO_BUFFERING flag on all CreateFile() [WIN API] calls within TB API. [CreateFile(), despite the name, is used for opening files as well].

The FILE_FLAG_NO_BUFFERING flag disables OS caching.

MODE NOCACHE OFF enables OS caching; this is the default;
MODE NOCACHE ON disables OS caching;
MODE NOCACHE ON {d | t | l | r | b} disables OS caching selectively by file type:
      d - .ddd file;
      t - .ttt file(s);
      l - .lll file(s);
      r - .rtl file(s);
      b - .rtb file(s);

This MODE must be set prior to opening the data base.
   In ddtl, 
      >>open <DB-name> NOCACHE ON

   With API
      ddlBegin()
      ddlMode(..."NOCACHE ON");
      ddlOpenR()
      ....
Form 10: SEQUENTIAL [OFF] | [nn]
[Incomplete]
Form 11: TABSTOP [OFF | T1,T2,...Tn]
[Incomplete]
Sets up to 50 tabstops. Currently, the tabstops are referenced only by the ddlLoad() and ddlLoadMem() functions in the Thunderbolt API. In all cases, tabstops are enabled only when the /I option is present.
Form 12: TEMP [<temp-path-1>[;<temp-path-2>]]
[Incomplete]
MODE TEMP provides a way to query and/or override the global temp file directory setting. The parameter can contain either a single full path; or two full paths separated by semi-colons. If two paths are specified:
       . They should be on different physical hard drives;
       . The first one should be on a different physical hard drive from the DB;
Form 13: TEMPLIMIT [<tempFileLimitMB>]
MODE TEMPLIMIT provides a way to limit the size of temp files used within TB API. The parameter specifies the max allowable temp file in MB [1024 * 1024]. The default is [1024 * 1024]; i.e., 1 TB.

If the size of a temporary file exceeds the specified limit, either initially or at any time during its existence, the operational TB API function terminates with an error.

The results of the ddlMode() "TEMPLIMIT" function are [in MB]:
. ctl->Ans1 - tempFileLimitMB [previous setting];
. ctl->Ans2 - tempFileLimitMB [new setting]
Form 14: TOKENMAP [{ON,OFF}]
[Incomplete]
If a Token Mapping has been defined and is enabled, it can be disabled with TOKENMAP OFF.
If a Token Mapping has been defined and is disabled, it can be enabled with TOKENMAP ON.

This function can also be used to inhibit the automatic initiation of the Token Map by ddlOpen(); in particular:
   In ddtl, 
      >>open <DB-name> TOKENMAP OFF

   With API
      ddlBegin()
      ddlMode(..."TOKENMAP OFF");
      ddlOpenR()
      ....
Form 15: TRACE [{ON,OFF}]
[Incomplete]
   Basic trace info consists of:
   . Function name;
   . Function OptnString (if applicable);
   . Function ArgString (if applicable);
   . Function Answer cells
     . ctl->Status - if non-zero;
     . ctl->ErrorString[]  - if ctl->Status is non-zero;
     . ctl->Ans1;
     . ctl->Ans2;
     . ctl->Ans3;
     . ctl->Ans4L - if non-zero;
     . ctl->Ans5L - if non-zero;
     . ctl->Ans6L - if non-zero;
 
   In Debug version, write basic trace info to WhamDiag unconditionally;
   also write extended trace information:
   . Join Conditions for ddlRelateEx();
   . Strategy Conditions for ddlRequestStrategy();
   . Image for ddlCompileRdMem(), ddlCreateTempTable(), ddlCreateCalcObject().
 
   In Release or Debug version, write basic trace info to log file if MODE 
   TRACE ON is in effect.
 
   The default setting is TRACE OFF.
Form 16: TRACKER [{ON,OFF}]
Enables/disables TRACKER calls to the Tracker Callback.
The default setting is ON.

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.