Problem:
Assuming that code such as:-
01 ws-data pic x(20) value spaces.
....
MOVE "HELLO WORLD" TO WS-DATA
The value at initialization will be something like "Y?a¤Y?a¤Y?a¤Y?a¤" and after the move statement ws-data will contain something like "Hello WorldY?a¤Y?a¤", seems to have included incorrect values.
Resolution:
This issue only occurs when the code is executed on a Virtual PC 2004 or Virtual Server 2005 virtual machine image.
Microsoft have been made aware of this problem and it will be fixed in Virtual PC 2007 and Virtual Server 2007.
The problem is caused by Virtual PC not correctly handling some MMX Intel Chip instructions that get generated by the .Net Common Language Runtime JIT Compiler.
Please note this only affects Net Express Version 5 COBOL .Net based application.
Net Express unmanaged application and .Net applications built with Net Express V4 (.Net Framework 1.x) are unaffected.
In Net Express V5 there is a workaround by compiling the application to verifible code. To do this via the build settings in the project properties or by using the ILVERIFY compiler directive.
Code generated as verifible will execute as expected.