Which compiler and operating system are you using? What do you mean by "did cob trace on"? My guesses on those is that you are using something very old.
As to why it abends/doesn't abend, my first thought would be that you have program code or data being overwritten, and by doing whatever the trace does, different program code or is now being overwritten and you don't get the S0C7.
You are lucky that you get the S0C7 outside of Production. All you have to do now is solve that dump. If you are unsure of how to do that, ask your seniors or your technical support. Especially with this type of situation, it is difficult to dump-solve on a forum.