Hi Brian,
In order to provide a performance increase, V5.2 generates different sequences of instructions than V4.2, and these can sometimes lead to different results when there is invalid data; with valid data, the results should be the same. One area you will notice more S0C7s with invalid data is in computations and comparisons using USAGE DISPLAY numbers at ARCH(10) (zEC12) and higher, as the compiler uses Decimal Floating Point arithmetic as a performance boost, and the instructions that convert to DFP don't tolerate invalid digits and sign codes, so a comparison that might have "worked properly" in V4.2 might now abend in V5/V6. There are other similar situations where this is also true.
In general, you shouldn't be producing or using invalid data, and the compiler is not generally designed to provide compatibility with V4.2; IBM generally doesn't test for or correct invalid data. However, when we're made aware of a migration blocker like this and there's no performance penalty in doing so, we do attempt to generate code that produces the same behaviour as V4.2 even when the data is invalid. In this case, you are moving invalid data into a USAGE DISPLAY field, but that should generally be fine as long as you aren't subsequently USING the data. You should correct your data, but I also recommend you open a PMR, so we can track this issue and get the necessary context to see if this is something we can address.
Mike Chase