Operating System - HP-UX
1753505 Members
4912 Online
108794 Solutions
New Discussion юеВ

Re: Hitachi Cobol to MF Cobol migration

 
Suresh Mahadevan
New Member

Hitachi Cobol to MF Cobol migration

We are doing migration from Hitachi Cobol to MF-Cobol. We have faced challenges on the behaviour of programs as given below :

1. In Hitachi cobol if you define a sending field as PIC X(6) and receiving field as PIC 9(6)and move operartion is performed from sending to receiving, the value stored in the receiving field is + 0 (a positive sign followed by 5 spaces and a zero).

2. In case of MF-Cobol using the same above operation the value stored in the receiving field is 000000 (6 zeros).

3. We resolved the above issue by changing the receiving field to PIC X(6) instead of PIC 9(6).

If anyone has faced any similar or different challenges would appreciate if you could share it or point me to any location if you are aware of where I can find the info to such issues.

2 REPLIES 2
James R. Ferguson
Acclaimed Contributor

Re: Hitachi Cobol to MF Cobol migration

Hi Suresh:

A long time ago, I was very familiar with the then Burroughs mainframe COBOL compilers. The ANSI rules and vendor implementations for moving fields and/or groups between different 'picture' definitions would fill a page or more of footnotes in the manuals.

You noted, thatt you, "resolved the above issue by changing the receiving field to PIC X(6) instead of PIC 9(6)."

This is exactly what I would have suggested. Re-definitions ('redefines') were the appropriate way to insure no data manipulation occured.

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: Hitachi Cobol to MF Cobol migration

It's been more than a decade since I used COBOL. And then I implemented/supported COBOLII for 14 years.

I think that compiler would move each byte from one to the other and would get various traps and try to fix each digit, if it wasn't numeric.