Nekon,
I have done this about half a year ago. In fact, our sources compile and run both in Net Express and Fujitsu Cobol now.
I could write the entire evening about the differences, I think you must ask some specific questions in this forum.
My experience is, Fujitsu is more strictly using ANSI standards than Net Express does.
The main differences are:
- Fujitsu doesn't know COMP-X fields. Change all your COMP-X to COMP.
- FUJITSU stores COMP and COMP-5 fields in 2, 4 or 8 bytes depending on the picture clause. Net Express stores those fields in 1, 2, ... 7 or 8 bytes. Fortunately, Fujitsu knows the BINARY(BYTE) compiler option, which changes this Fujitsu behaviour to the same as Net Express. I must strongly advise you to use this option in Fujitsu.
- In Net Express, you can have alphanumeric comp-5 fields, eg PIC X(02) COMP-5. Fujitsu doesn't like this. If you declare a field like PIC X(02) COMP-5, you have a two-byte field which can hold any unsigned number which fits into two bytes, so 0 .. 65535. These fields are very important if you call the Windows API's or C(++) routines directly from Cobol. In Fujitsu, you must declare them as 9(04) COMP-5. The behaviour of those fields is exactly like the PIC X(02) COMP-5, but only if you use the BINARY(BYTE) compiler option. If you move 12345 to such a field, you get a compiler warning (numeric overflow), but in spite of the warning, the execution goes right. If you use a value-clause, there is no warning but an error, and no object is generated. So: 01 FIELD-NAME PIC X(02) COMP-5 VALUE 12345 can not be translated to 01 FIELD-NAME PIC 9(04) COMP-5 VALUE 12345. Instead, you must make: 01 FIELD-NAME PIC 9(04) COMP-5, and MOVE 12345 TO FIELD-NAME in the initialization of the program.
- All fields without a value-clause are initialized to spaces in Net Express and to low-values in Fujitsu.
These are the main differences, if you need more information, please post another question in this forum. Marcel