Release Overview : isCOBOL 2024 Release 1 Overview : Compatibility enhancements
Compatibility enhancements
IsCOBOL 2024 R1 improves compatibility with IBM COBOL by supporting LINE LIMIT in the REPORT SECTION and by implementing additional functions.
Report Section
The Report Section is a COBOL section supported by IBM that allows definition of a report. It produces a text file with the statements “initiate”, “generate” and “terminate”.
isCOBOL 2024R1 adds support for the LINE LIMIT clause to specify the maximum number of characters that can be written to a line. Characters exceeding the line limit are truncated from the output.
For example, this code:
       report section.
           rd  my-report
               control are final
               page limit 22 lines
               line limit 50
               heading 1.
           01 detail-line type de line plus 2.
              02 line plus 1.
                03 column  4 pic x(10) source field1.
                03 column 20 pic x(20) source field2.
                ...
           open output F1.
           initiate my-report.
           ...
           generate detail-line.
           terminate my-report.
           close F1.
sets the LINE LIMIT to 50. The runtime will truncate the output generated by the running program to the specified size.
New functions
NUMVAL and NUMVAL-C are existing functions meant to convert an alphanumeric variable to a numeric variable, and NUMVAL-C can be used on values containing currency symbols and/or commas.
To improve compatibility with IBM COBOL, the new NUMVAL-F function has been implemented in isCOBOL 2024 R1. This function extends conversion support to number strings that contain an exponent value.
Every function can be tested with the specific function named TEST-NUMVAL* that returns 0 if the argument passed conforms to the argument rules for the corresponding NUMVAL* function, or the position of the first character encountered that invalidates the string.
A code snippet like this:
           if function test-numval(varx) = 0
              move function numval(varx) to varn
           end-if
           ...
           if function test-numval-c(varx) = 0
              move function numval-c(varx) to varn
           end-if
           ...
           if function test-numval-f(varx) = 0
              move function numval-f(varx) to varn
           end-if
is now valid and can be compiled and executed successfully.