Advanced Configuration
Configuration Using JAVA Properties
Advanced Capability
This section describes an advanced capability. You should not attempt to use this unless you are certain that it is necessary and are aware of the result. Incorrect setting of the Java properties of P3/COBOL could result in incorrect operation, data corruption, or data loss.
Configures all instances of P3/COBOL running in a single JVM
These configuration settings affect all P3/COBOL instances in the same JVM. They will be set by the first instantiation during the lifetime of the JVM. Subsequent instances of P3/COBOL will not affect the settings established by the first instance.
P3/COBOL has many configuration settings, and all of them have default values that are intended to apply to the vast majority of P3/COBOL uses. On rare occasions, however, these defaults may be adjusted to better align P3/COBOL's behavior with a specific application or class of applications. In order to provide a way to change some of these default settings (e.g., reverse compatibility, migration from another COBOL, company standards), many may be set via normal runtime configuration. Other defaults cannot be set via normal configuration, but can be changed with Java properties. When set in this manner, the default value specified will be used in place of the documented default configuration within the scope of the property setting (usually the JVM invoked with the property set). Any explicit configuration of the affected options will, of course, override the default as expected.
The general form of the default setting properties is:
package-name.class-name.default-name=default-value
The means of setting the property varies, and is documented in the Java command line documentation. Most often,
the P3/COBOL user will set these properties using either the command line option pass through of
-Dpackage-name.default-name=default-value or the Run Configuration argument setting.
An example, setting the Java property -Dcom.turrettech.p3cobol.P3SourceBuilder.MAX_COMPILE_THREADS=7 would be:
p3 b -Dcom.turrettech.p3cobol.P3SourceBuilder.MAX_COMPILE_THREADS=7 -- src-cobol/*.cblwhich would have effect of using a custom file connector class for all indexed files by default.
Compiler Configuration
The following compiler options may be set as follows:
-Dcom.turrettech.p3cobol.compiler.context.P3Context.RUN_GC_ON_CLOSE=falseThis may be set to true in order to force Java garbage collection after each compilation.
-Dcom.turrettech.p3cobol.P3SourceBuilder.MAX_COMPILE_THREADS=7This may be set to the maximum number of threads allowed for the P3/COBOL compiler to use when running asynchronous parallel compilations. Note that setting this to a larger number increases the possibility of requiring more heap and/or stack memory to be specified in order for the successful running of the compiler.
-Dcom.turrettech.p3cobol.P3SourceBuilder.MAX_COMPILE_STACK=2000000-Dcom.turrettech.p3cobol.compiler.expressions.ExpressionString.ALWAYS_DUPLICATE=true-Dcom.turrettech.launch.internal.Emojis.ACTIVE=trueDecimal Configuration
The following options are only effective when the decimal-type option is set to CHECKED_DECIMAL.
The following decimal arithmetic options may be set as follows:
-Dcom.turrettech.p3cobol.lib.CheckedDecimal.TRACE=false-Dcom.turrettech.p3cobol.lib.CheckedDecimal.CHECK=false-Dcom.turrettech.p3cobol.lib.CheckedDecimal.RELAXED_PRECISION=false-Dcom.turrettech.p3cobol.lib.CheckedDecimal.DOUBLE_TIME=falseData Handling Configuration
The following run unit options may be set as follows:
-Dcom.turrettech.p3cobol.lib.common.DataUtil.THROW_DATA_EXCEPTION=trueThrow P3DataException when invalid numeric value(s) encountered (true). If set to false, the error will be logged but the requested operation will continue (with erroneous results). The validity of zoned and packed decimal items is controlled by the corresponding "validation" runtime configuration option.
Run Unit Configuration
The following run unit options may be set as follows:
-Dcom.turrettech.p3cobol.lib.RunUnit.OVERRIDE_STDOUT_FILE_PATH=/my/path/to/file.out-Dcom.turrettech.p3cobol.lib.RunUnit.OVERRIDE_STDIN_FILE_PATH=/my/path/to/file.in-Dcom.turrettech.p3cobol.lib.RunUnit.OVERRIDE_STDERR_FILE_PATH=/my/path/to/file.errorDebugger Configuration
The following debugger options may be set as follows:
-Dcom.turrettech.p3cobol.lib.internal.debug.frames.FrameManager.MAX_UNABBREVIATED_STRING=100Terminal IO Configuration
The following terminal IO options may be set as follows:
-Dcom.turrettech.p3cobol.lib.devices.terminal.lantern.RMCharacterTerminal.FORCE_FULL_REFRESH=false-Dcom.turrettech.p3cobol.lib.devices.terminal.lantern.RMTextBox.TRACE=falseFile System Configuration
The following file system options may be set as follows:
-Dcom.turrettech.p3cobol.lib.files.CobolIndexedFile.DEFAULT_CONNECTOR_CLASS=...-Dcom.turrettech.p3cobol.lib.files.CobolIndexedFile.DEFAULT_LISTENER_CLASS=...-Dcom.turrettech.p3cobol.lib.files.CobolRelativeFiles.DEFAULT_CONNECTOR_CLASS=...-Dcom.turrettech.p3cobol.lib.files.CobolRelativeFiles.DEFAULT_LISTENER_CLASS=...-Dcom.turrettech.p3cobol.lib.files.CobolSequentialFiles.DEFAULT_CONNECTOR_CLASS=...-Dcom.turrettech.p3cobol.lib.files.CobolSequentialFiles.DEFAULT_LISTENER_CLASS=...Storage Manager Configuration
The following MVCC storage manager options may be set as follows:
-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvTransaction.MAX_TRANSACTION_RETRIES=10-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_COMPRESSION=true-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_PAGE_SPLIT_SIZE=4096-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_PAGE_SPLIT_SIZE_COMPRESSED=65536-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_CACHE_SIZE=16-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_AUTOCOMMIT_BUFFER_SIZE=1024-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_AUTOCOMPACT_FILL_RATE=50-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_AUTOCOMMIT=true-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_COMPACT=false-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.IN_MEMORY_PREFIX=mem:-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.COMPRESSION_LEVEL=1-Dorg.h2.mvstore.db.P3Store.JOURNALING=false-Dorg.h2.mvstore.db.P3Store.DEFAULT_JOURNAL_PERIOD=PT1H-Dorg.h2.mvstore.db.P3Store.DEFAULT_JOURNAL_START=2015-09-01-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.autoRewriteLegacyVolumes=true-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.volume.LegacyMvStoreBridge.legacyH2Jar=/path/to/lib/legacy-mvstore/h2.jar-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.volume.LegacyMvStoreBridge.legacyReaderJar=/path/to/legacy-mvstore-reader.jarFile Server Configuration
The following indexed file server options may be set as follows:
-Dcom.turrettech.p3cobol.lib.files.indexed.IndexedFileServer.DEFAULT_IDLE_TIMEOUT_SECS=10-Dcom.turrettech.p3cobol.lib.files.indexed.Network.DEFAULT_PORT=11235-Dcom.turrettech.p3cobol.lib.files.indexed.Network.DEFAULT_TIMEOUT=10000-Dcom.turrettech.p3cobol.lib.files.indexed.Network.DEFAULT_HOST=localhost-Dcom.turrettech.p3cobol.lib.files.indexed.Network.DEFAULT_MAX_OBJECT_SIZE=10000-Dcom.turrettech.p3cobol.lib.files.indexed.Network.DEFAULT_OPERATION_TIMEOUT=20000-Dcom.turrettech.p3cobol.lib.files.indexed.StorageManagerConnection.DEFAULT_SERVER_TYPE=MVCC-Dcom.turrettech.p3cobol.lib.files.indexed.StorageManagerConnection.MAX_TERMINATION_SECONDS=5Sort/Merge Configuration
The following sort/merge options may be set as follows:
-Dcom.turrettech.p3cobol.lib.files.internal.sort.SortEngine.MAX_COLLECTION_SORT_SIZE=100000-Dcom.turrettech.p3cobol.lib.files.internal.sort.SortList.TRACE=falseApplication Server Configuration
The following application server options may be set as follows:
-Dcom.turrettech.p3cobol.server.app.AppServer.DEFAULT_CLIENT_TIMEOUT_MS=0-Dcom.turrettech.p3cobol.server.app.AppService.DEFAULT_INPUT_BUFFER_SIZE=100-Dcom.turrettech.p3cobol.server.app.AppService.DEFAULT_ALIVE_INTERVAL_SECS=1-Dcom.turrettech.p3cobol.server.tuxedo.CobolServer.TRACE=false