Skip to main content

[Migrated content. Thread originally posted on 15 March 2004]

RMCOBOL-85 indexed file-record looks like this.
01 FILE-RECORD.
03 RECORD-KEY.
05 CLIENT-NR PIC S9(9) COMP-3.

Vision file-record looks like this.
01 FILE-RECORD.
03 RECORD-KEY.
05 CLIENT-NR PIC 9(9) COMP-3.

I wrote a program to transfer this RMCOBOL-85 file to the Vision-file record layout and then I use Vision File Utility to convert the new file.

If I view the records, let's say n?. 1 - 2 - 3 - 4 - 5, everything seems ok.
When I add record with client nr. 9000, then I view the records, I get this order : 9000 - 1 - 2 - 3 - 4 - 5.

How come ?

[Migrated content. Thread originally posted on 15 March 2004]

RMCOBOL-85 indexed file-record looks like this.
01 FILE-RECORD.
03 RECORD-KEY.
05 CLIENT-NR PIC S9(9) COMP-3.

Vision file-record looks like this.
01 FILE-RECORD.
03 RECORD-KEY.
05 CLIENT-NR PIC 9(9) COMP-3.

I wrote a program to transfer this RMCOBOL-85 file to the Vision-file record layout and then I use Vision File Utility to convert the new file.

If I view the records, let's say n?. 1 - 2 - 3 - 4 - 5, everything seems ok.
When I add record with client nr. 9000, then I view the records, I get this order : 9000 - 1 - 2 - 3 - 4 - 5.

How come ?
I don't know if this could help you or not but I recall having a strange situation similar to yours where the compiler I was using treated a signed COMP-3 differently than an unsigned one when there was a zero value.

Maybe yours is treating one as positive and the other as unsigned and keeping a different sign value?

Brad

[Migrated content. Thread originally posted on 15 March 2004]

RMCOBOL-85 indexed file-record looks like this.
01 FILE-RECORD.
03 RECORD-KEY.
05 CLIENT-NR PIC S9(9) COMP-3.

Vision file-record looks like this.
01 FILE-RECORD.
03 RECORD-KEY.
05 CLIENT-NR PIC 9(9) COMP-3.

I wrote a program to transfer this RMCOBOL-85 file to the Vision-file record layout and then I use Vision File Utility to convert the new file.

If I view the records, let's say n?. 1 - 2 - 3 - 4 - 5, everything seems ok.
When I add record with client nr. 9000, then I view the records, I get this order : 9000 - 1 - 2 - 3 - 4 - 5.

How come ?
I don't know if this could help you or not but I recall having a strange situation similar to yours where the compiler I was using treated a signed COMP-3 differently than an unsigned one when there was a zero value.

Maybe yours is treating one as positive and the other as unsigned and keeping a different sign value?

Brad

[Migrated content. Thread originally posted on 15 March 2004]

RMCOBOL-85 indexed file-record looks like this.
01 FILE-RECORD.
03 RECORD-KEY.
05 CLIENT-NR PIC S9(9) COMP-3.

Vision file-record looks like this.
01 FILE-RECORD.
03 RECORD-KEY.
05 CLIENT-NR PIC 9(9) COMP-3.

I wrote a program to transfer this RMCOBOL-85 file to the Vision-file record layout and then I use Vision File Utility to convert the new file.

If I view the records, let's say n?. 1 - 2 - 3 - 4 - 5, everything seems ok.
When I add record with client nr. 9000, then I view the records, I get this order : 9000 - 1 - 2 - 3 - 4 - 5.

How come ?
I don't know if this could help you or not but I recall having a strange situation similar to yours where the compiler I was using treated a signed COMP-3 differently than an unsigned one when there was a zero value.

Maybe yours is treating one as positive and the other as unsigned and keeping a different sign value?

Brad