MITHARG
Would you like to react to this message? Create an account in a few clicks or log in to continue.

PL/1 - Negative Zero

Go down

PL/1 - Negative Zero Empty PL/1 - Negative Zero

Post  kasthuri Sun Jan 27, 2013 6:43 pm

We are facing problem when migrating to Enterprise PL/1. Do you have any migration rule book?

DCL IN_FLD PIC’(6)9’;
DCL IN_SIGN CHAR(1);
DCL OUT_FLD FIXED DEC(7);

OUT_FLD = IN_FLD;
IF IN_SIGN = ‘-‘ THEN
DO;
OUT_FLD = OUT_FLD*(-1);
END;

In Case IN_FLD is 0 ( Zero) with IN_SIGN = ‘-‘, the OUT_FLD is having result as 0 (Zero) with Enterprise Compiler. With Old Compiler, Results are -0 or X(0C) . We have changed the compiler options to “FORCEDSIGN” but results are without Negative Sign. This is working fine for other Numeric Values.

Please provide your thoughts.

kasthuri

Posts : 212
Join date : 2013-01-27

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum