Currently SET is mostly a "special internal MOVE".
This leads to the runtime exceptions not being set but invalid values (zero, negative, out-of-bounds) landing in there.
For details how this should operate see ISO/IEC 1989:2022 COBOL 14.9.39.4 SET statement General rules Format 1 + 2.
Note: on the way [bugs:#228], which is only about the compiler checks, may be handled, too.
Related
Bugs: #228