I think I have found a bug in the RPG compiler or runtime - if I take a %CHECKR statement, and subtract an integer number from it, and the result is negative, it throws MCH1210 receiver value too small even if it isn't.
Test case:
I am on v7.2, I don't know what PTF level.
Can anyone else confirm?
Test case:
Code:
dcl-s str char(8); dcl-s val int(10); str = 'FFF'; val = %checkR(' ':str) - 2; // 1 val = %checkR(' ':str) - 3; // 0 val = %checkR(' ':str); // = 3 val = val - 4; // = -1 // Should = -1, instead MCH1210 receiver value too small val = %checkR(' ':str) - 4; *inlr = *on; return;
Can anyone else confirm?
Comment