Created On:  26 October 2012

Problem:

Customer has managed code Windows Form application that is doing a COBOL sort:

    SORT SORT-FILE
       ON ASCENDING KEY
sort-key
       USING
TMP-FILE
       GIVING
TMP-FILE

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

Resolution:

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.

Incident #2596409