By default RM/COBOL Sequential and Relative files are limited to 1Gb, can this be increased?
With RM/Cobol is it possible to create sequential or relative files that are greater 1Gb?
The default file limit for sequential and relative files is 1Gb. By using runtime configuration options this limit can increased to a maximum of 128Gb.
By setting the runtime configuration option LARGE-FILE-LOCK-LIMIT=x the index file limit can be increased.
Where x = the size in Gb of the new file size limit, e.g. 128 for 128Gb.
To make use of the new limit, the USE-LARGE-FILE-LOCK-LIMIT=YES, for the relevant file type must also be set.
Runtime configuration options can either be placed in the default configuration file, runcobol.cfg (this is located in the RM/COBOL installation directory) or a configuration file that is passed to the runtime system as an application starts. Below are examples of values that the configuration options can be set to for the different file types.
To increase the file limit for sequential files to 128Gb add the following two lines to the configuration file that is being used.
To increase the file limit for relative files to 32Gb add the following two lines to the configuration file.
Points to note:
For sequential and relative files, the actual maximum file size is half the value set by the LARGE-FILE-LOCK-LIMIT.
These limits are read as the run unit starts, so all applications must be stopped before the changes are used.
The LARGE-FILE-LOCK-LIMIT runtime configuration option is used only when a file is created. This needs to be in place before the file is created.
The RM/Cobol utility ‘recover2’ can be used to convert an index file to a sequential file. If the above runtime configuration options are not placed in runcobol.cfg file, the maximum file created will be limited to 1Gb. Errors will be reported when the utility tries to write out data past the 1Gb limit.
The USE-LARGE-FILE-LOCK-LIMIT=YES needs to be set and is specific for each of the different file types.
Incident # 2795589