The maxlencheck option specifies whether to check that the record being read from disk fits entirely into the record buffer for which length is equal to the maxlen file definition. If this option is set to yes, an error is returned if the record read from disk is larger than maxlen bytes. If this option is set to no, the record is truncated at maxlen bytes before it is returned to COBOL. This option is enabled by default.
This option is must useful for a table that has been expanded with new fields using the RTG alter table operation. Existing runtimes might not be immediately able to be recompiled, and this option allows file opens from these existing applications as they don't care and are unaware of any new fields that have been added.
Note: maxlencheck is performed on each record read operation to check if a variable length record fits in the defined record max length as specified in the application FD. This in in contrast to the recordcheck option which validates the record size on file open.
Accepted Values
Value |
Effect |
Synonyms |
---|---|---|
yes |
Return an error if record is larger than maxlen bytes. This is the default value. |
y, true, on, 1 |
no |
Return record truncated at maxlen bytes. |
n, false, off, 0 |
Example
<maxlencheck>no</maxlencheck>
See Also