Something that will work with all vendors and even the oldest compilers (as you did not specified any dialect the seems to be the most important part): if it matters use an additional target field with more decimal positions and check for equality afterwards:
COMPUTE MY-RESULT RESULT-WITH-MORE-DECIMALS = A * B
IF MY-RESULT NOT = RESULT-WITH-MORE DECIMALS
ON SIZE ERROR will only be tracked for the upper truncation.
If this 2014 feature os available for your compiler you could use the
INTERMEDIATE ROUNDING IS PROHIBITED (the draft had it in as
ROUNDED-MODE PROHIBITED) which will show you this problem (if
EC-SIZE-TRUNCATION exception is enabled). Beware of one part: this is an exception with a "fatal" category...