🛠️ P3/COBOL 25.1.0-SNAPSHOT is available for preview.
Annex
Advanced Configuration

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/*.cbl

which 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:

Run GC when compiler terminates
-Dcom.turrettech.p3cobol.compiler.context.P3Context.RUN_GC_ON_CLOSE=false

This may be set to true in order to force Java garbage collection after each compilation.

Maximum number of threads allowed for parallel compilation
-Dcom.turrettech.p3cobol.P3SourceBuilder.MAX_COMPILE_THREADS=7

This 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.

Maximum size (in bytes) to be allowed for each compilation thread
-Dcom.turrettech.p3cobol.P3SourceBuilder.MAX_COMPILE_STACK=2000000
Force duplication of ByteBuffer-based arguments to prevent interference
-Dcom.turrettech.p3cobol.compiler.expressions.ExpressionString.ALWAYS_DUPLICATE=true
Use Emojis when printing to the console
-Dcom.turrettech.launch.internal.Emojis.ACTIVE=true

Decimal 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:

Trace CheckedDecimal operations
-Dcom.turrettech.p3cobol.lib.CheckedDecimal.TRACE=false
Check CheckedDecimal operations
-Dcom.turrettech.p3cobol.lib.CheckedDecimal.CHECK=false
Use relaxed precision
-Dcom.turrettech.p3cobol.lib.CheckedDecimal.RELAXED_PRECISION=false
Repeat all decimal operations to facilitate deduction of time spent in computation
-Dcom.turrettech.p3cobol.lib.CheckedDecimal.DOUBLE_TIME=false

Data Handling Configuration

The following run unit options may be set as follows:

-Dcom.turrettech.p3cobol.lib.common.DataUtil.THROW_DATA_EXCEPTION=true

Throw 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:

Use specified file path for standard out
-Dcom.turrettech.p3cobol.lib.RunUnit.OVERRIDE_STDOUT_FILE_PATH=/my/path/to/file.out
Use specified file path for standard in
-Dcom.turrettech.p3cobol.lib.RunUnit.OVERRIDE_STDIN_FILE_PATH=/my/path/to/file.in
Use specified file path for standard error
-Dcom.turrettech.p3cobol.lib.RunUnit.OVERRIDE_STDERR_FILE_PATH=/my/path/to/file.error

Debugger Configuration

The following debugger options may be set as follows:

Maximum unabbreviated string length (100; 0 indicates unlimited)
-Dcom.turrettech.p3cobol.lib.internal.debug.frames.FrameManager.MAX_UNABBREVIATED_STRING=100

Terminal IO Configuration

The following terminal IO options may be set as follows:

Force full terminal refresh
-Dcom.turrettech.p3cobol.lib.devices.terminal.lantern.RMCharacterTerminal.FORCE_FULL_REFRESH=false
Trace terminal character input actions
-Dcom.turrettech.p3cobol.lib.devices.terminal.lantern.RMTextBox.TRACE=false

File System Configuration

The following file system options may be set as follows:

Determines the indexed file connector class name to be used by default
-Dcom.turrettech.p3cobol.lib.files.CobolIndexedFile.DEFAULT_CONNECTOR_CLASS=...
Determines the indexed file listener class name to be used by default
-Dcom.turrettech.p3cobol.lib.files.CobolIndexedFile.DEFAULT_LISTENER_CLASS=...
Determines the relative file connector class name to be used by default
-Dcom.turrettech.p3cobol.lib.files.CobolRelativeFiles.DEFAULT_CONNECTOR_CLASS=...
Determines the relative file listener class name to be used by default
-Dcom.turrettech.p3cobol.lib.files.CobolRelativeFiles.DEFAULT_LISTENER_CLASS=...
Determines the sequential file connector class name to be used by default
-Dcom.turrettech.p3cobol.lib.files.CobolSequentialFiles.DEFAULT_CONNECTOR_CLASS=...
Determines the sequential file listener class name to be used by default
-Dcom.turrettech.p3cobol.lib.files.CobolSequentialFiles.DEFAULT_LISTENER_CLASS=...

Storage Manager Configuration

The following MVCC storage manager options may be set as follows:

Maximum number of transaction commit retries within atomic IO operation before declaring an IO error
-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvTransaction.MAX_TRANSACTION_RETRIES=10
Determines the default for compression of data stored in MVCC volumes
-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_COMPRESSION=true
Threshold (bytes) of uncompressed page filling before a node split results
-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_PAGE_SPLIT_SIZE=4096
Threshold (bytes) of compressed page filling before a node split results
-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_PAGE_SPLIT_SIZE_COMPRESSED=65536
Size (megabytes) of the page cache maintained by a single volume manager instance
-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_CACHE_SIZE=16
Maximum number of operations in memory before forcing to persistent storage
-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_AUTOCOMMIT_BUFFER_SIZE=1024
Minimum percent of page usage to maintain via auto-compaction
-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_AUTOCOMPACT_FILL_RATE=50
Determines if transaction log enties are automatically flushed to persistent storage when DEFAULT_AUTOCOMMIT_BUFFER_SIZE threshold is reached
-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_AUTOCOMMIT=true
Determines if compaction automatically occurs when volume is quiescent
-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.DEFAULT_COMPACT=false
Volume path prefix to indicate
-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.IN_MEMORY_PREFIX=mem:
Number indicating compression algorithm to use
-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.COMPRESSION_LEVEL=1
Enable journaling
-Dorg.h2.mvstore.db.P3Store.JOURNALING=false
Default journal period
-Dorg.h2.mvstore.db.P3Store.DEFAULT_JOURNAL_PERIOD=PT1H
Default journal start time
-Dorg.h2.mvstore.db.P3Store.DEFAULT_JOURNAL_START=2015-09-01
Automatically rewrite legacy 25.0- MVCC volumes to the current format on first open (default true)
-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.MvStorageManager.autoRewriteLegacyVolumes=true
Optional absolute path to the 25.0- H2 jar used when reading legacy volumes
-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.volume.LegacyMvStoreBridge.legacyH2Jar=/path/to/lib/legacy-mvstore/h2.jar
Optional absolute path to the legacy MVStore reader jar used when reading legacy volumes
-Dcom.turrettech.p3cobol.lib.files.internal.h2mv.volume.LegacyMvStoreBridge.legacyReaderJar=/path/to/legacy-mvstore-reader.jar

File Server Configuration

The following indexed file server options may be set as follows:

Timeout (in secs) before indexed file server is considered disconnected if no communication received
-Dcom.turrettech.p3cobol.lib.files.indexed.IndexedFileServer.DEFAULT_IDLE_TIMEOUT_SECS=10
Default port number for indexed file server
-Dcom.turrettech.p3cobol.lib.files.indexed.Network.DEFAULT_PORT=11235
Default timeout (in msecs) for indexed file server operation
-Dcom.turrettech.p3cobol.lib.files.indexed.Network.DEFAULT_TIMEOUT=10000
Default host name for indexed file server
-Dcom.turrettech.p3cobol.lib.files.indexed.Network.DEFAULT_HOST=localhost
Maximum serialized object size (in bytes) supported by indexed file server
-Dcom.turrettech.p3cobol.lib.files.indexed.Network.DEFAULT_MAX_OBJECT_SIZE=10000
Timeout (in msecs) of indexed file operation
-Dcom.turrettech.p3cobol.lib.files.indexed.Network.DEFAULT_OPERATION_TIMEOUT=20000
Default server type
-Dcom.turrettech.p3cobol.lib.files.indexed.StorageManagerConnection.DEFAULT_SERVER_TYPE=MVCC
Maximum allowed termination time (in secs) for storage manager connection
-Dcom.turrettech.p3cobol.lib.files.indexed.StorageManagerConnection.MAX_TERMINATION_SECONDS=5

Sort/Merge Configuration

The following sort/merge options may be set as follows:

Maximum in-memory Collection size
-Dcom.turrettech.p3cobol.lib.files.internal.sort.SortEngine.MAX_COLLECTION_SORT_SIZE=100000
Trace sort operations
-Dcom.turrettech.p3cobol.lib.files.internal.sort.SortList.TRACE=false

Application Server Configuration

The following application server options may be set as follows:

Default app server client timeout
-Dcom.turrettech.p3cobol.server.app.AppServer.DEFAULT_CLIENT_TIMEOUT_MS=0
Terminal input buffer size
-Dcom.turrettech.p3cobol.server.app.AppService.DEFAULT_INPUT_BUFFER_SIZE=100
Interval to send keep-alive messages
-Dcom.turrettech.p3cobol.server.app.AppService.DEFAULT_ALIVE_INTERVAL_SECS=1
Default app server client timeout
-Dcom.turrettech.p3cobol.server.tuxedo.CobolServer.TRACE=false