It ran fine on the mainframe. Now you are converting it to the “i” but where is the program running? Is it still running on the mainframe? Or has the code been compiled and executed on some other platform and operating system?
You are getting this error during COMPILE; right?
IF you have taken the source code from the mainframe and copied to some other box and are trying to compile in a new environment, you need to ensure that you are following the rules for COBOL in this new environment. Not all COBOLs are the same. Each compiler has its own rules. Just like SQL for DB2 is different than SQL for Oracle. IBM COBOL on the mainframe is different from NetCOBOL for Windows. So check the syntax of this PC version of COBOL internal SORT.