Everything I've ever read or heard has said that a COMP-3 field used in arithmatic should be signed as otherwise
there would be an extra instruction generated to force the sign to x'0F'. I have run several tests however showed that an unsigned field was more efficient. I generated the Assembler code to see what was going on and here is what I found. With the unsigned field there is indeed an extra "OI 14(8),X'0F'" generated to force the sign to "F" but with the signed "receiving" I am getting an extra "ZAP 10(5,8),10(5,8) BUCKET BUCKET" generated which is taking much longer than the "OI" is.
What's going on? This is with IBM Enterprise COBOL on a mainframe.
there would be an extra instruction generated to force the sign to x'0F'. I have run several tests however showed that an unsigned field was more efficient. I generated the Assembler code to see what was going on and here is what I found. With the unsigned field there is indeed an extra "OI 14(8),X'0F'" generated to force the sign to "F" but with the signed "receiving" I am getting an extra "ZAP 10(5,8),10(5,8) BUCKET BUCKET" generated which is taking much longer than the "OI" is.
What's going on? This is with IBM Enterprise COBOL on a mainframe.