odabaOptions - Common ODABA options
There are some common options which might be set before calling an application or in a configuration or ini-file. Permanent options might also be set in the system environment (using the set command).
Moreover, options might be set in a option hierarchy stored in the application database. Thus, each user may get his own settings. One may, however also provide options via configuration or ini-files, which is easier in many cases. In order to manage options set in an application database, one may use the OptionBrowser (GUI tool).
The odaba::Option class supports getting and setting options from within an application program.
Besides common ODABA options, each application may define additional options in order to control the behavior of the application.
Enumarators overview
- REQUEST_TIMEOUT
(85) - Timeout interval for client server applications
- SystemIO
(50) - System input/output options
- TRACE
(84) - Location for log files
- TRACE_MESSAGES
(1) - Display trace information
Enumerator details
-
TRACE_MESSAGES - Display trace information
The option causes the system to display trace information generated by the application or system processes. Trace information supported by ODABA are typically performance or memory measurements, which are usually displayed at the end of a thread or at the end of a process.
YES - Write trace messages to location defined in the TRACE option (trace.lst)
CON - write trace messages to console or output area in addition
NO - no trace information is written
Default: NO
Code: 1
to list -
SystemIO - System input/output options
System input/output options allow controlling the behavior of writing messages to the system output area and receiving information from there. System input/output is directed to console for console applications and to designated controls in GUI applications.
Code: 50
to list -
Progress - Progress display options
Several utilities support progress information. The way of displaying progress information depends on the settings for the progress options in the SystemIO section.
[SystemIO]
Progress=display_type
The Progress section is a sub option of the SystemIO option. Usually, progress information is configured in the SystemIO section defined in the configuration or ini-file passed to the utility. Within an ini-file, subsections are not supported directly and have to be defined by preceding section names:
Progress=dots
Progress.Distance=100
Some utilities, however, do not refer to a configuration file. In this case, progress options might be set as environment variables, e.g.
SystemIO.Progress=dots
SystemIO.Progress.Distance=100
Using the odaba::Option class supports setting the options from within a program. The progress display types are not case sensitive. The following display types are supported:
automatic
Automatic progress information display tries to select the optimal way of displaying progress information, which depends on the number of items to be copied.
percent
Progress messages in percent display the estimated percentage of work that has been done. The option will be changed automatically to rotator, when maximum number of items is not supported by the utility.
dots
The dots progress display just writes a series of dots. Typically, dots are displayed, when a number of items defined in the SystemIO.Progress.Modulo option has been processed.
rotator
The rotator displays an rotating line in the system output in order to show progress speed.
time
The elapsed time will be displayed on system output area.
to list -
Protocol - Additional protocol output
Normally, program messages are written to system output area, which is the console for console programs and the output area control for GUI applications.
In addition, system output might be written to a protocol file. When defining a complete path to a protocol file, system output will be printed to this file, too.
Code: 52
to list -
Suppress - Suppress system output
In order to suppress program output to the system output area, the suppress option might be set to true (YES).
Default: NO
Code: 53
to list -
Distance - Display frequency
The value determines the frequency of displaying the progress message. In case of percentage, it is the distance between two percent values (e.g. displaying a message each 5 percent). For all other progress display types it is the number of items to be passed before displaying the next progress message (e.g. display a progress message each 100 records copied).
When not defining the Distance option, an optimal distance value is determined by the system.
Default: 10
Code: 54
to list -
NewLine - Each progress message on separate line
Display messages on the next line. When this option is set to false (NO), each progress message will be displayed on the same line deleting the content of the previous message. The option will be ignored, when the display type is dots.
Default: NO
Code: 55
to list -
Remaining - Display estimated remaining time
In order to display the estimated remaining time in after the type specific progress information, the option might be set to true (YES). The option will be ignored, when the display type is dots.
Default: NO
Code: 56
to list -
Trace - Write progress messages to error log
For displaying progress messages in the error log in addition, this option should be set to true (YES).
Default: NO
Code: 57
to list -
Count - Maximum number of items
When the number of items to be processed cannot be determined by the program, an estimated number of items can be set as progress options. This allows configuring specific processes by passing the estimated number of items to the function.
Default: 0
Code: 58
to list -
TRACE - Location for log files
The option defines the location for log files. ODABA supports three log files:
- error log, which records all kinds of registered irregularities (error.lst)
- trace messages, which are submitted by the system or the application to register specific events or resources (trace.lst)
- protocol messages, which are usually generated to record actions (protocol.lst)
The option refers to the path where log files are to be stored.
Default: none
Code: 84
to list -
REQUEST_TIMEOUT - Timeout interval for client server applications
In order to prevent client/server applications from blocking the server, a timeout interval can be defined. In case of a defined timeout value (number of seconds until canceling a server request) server requests are canceled when exceeding the time defined in the timeout interval.
Code: 85
to list