Problem with doing SORT in managed code results in error "Index was outside the bounds of the array."
ON ASCENDING KEY sort-key
The statement is being executed from within an object method.
When the sort is executed the following exception occurs:
"Index was outside the bounds of the array."
This was determined to be caused by using SORT with USING/GIVING directly within a managed code object method.
The problem has been fixed by development and the fix will be available in a future release of Visual COBOL (after initial 2.1)
A workaround is to move the SORT statement to a procedural COBOL program and call this program from within the method instead of doing the SORT directly in the method.