You also DISPLAYed after the CALLs to any Assembler programs? With poor coding it is possible to leave a "side affect" from Assembler.
Assuming that you have done the DISPLAYs after the Assembler then I suspect you have a very "tricky" problem in that the "special register" RETURN-CODE is being overwritten (probably along with other stuff). As you make changes to the program, the overwriting starts in a different place, so different values are being overwritten in the RETURN-CODE.
Usually it is subscripts/indexes going "wild", but SSRANGE should have trapped any of those. Mostly otherwise it is a called sub-program doing it.
How big is your program? What sort of files/databases are being used? Is your program CALLed by another? How many OCCURS are there? Is indexing or subscripting used to reference OCCURS items?
Not being there myself, I think the best is for you to attempt to "isolate" the point in the program where the RETURN-CODE gets a value.
So,
IF RETURN-CODE NOT EQUAL TO ZERO
DISPLAY "RETURN-CODE IS>" RETURN-CODE "<"
DISPLAY "AT DISPLAY xxx"
END-IF
Where xxx you make unique for each IF.
Use a "binary chop" approach. Put a few of these (say four) at the "high level" control of your program. The first which produces a result will indicate the main part of the code where the problem occurs.
Then do the same for the next highest level in that part of the code.
Keep "narrowing it down" until you get to the particular line.
Let us know, it is interesting.
You won't find anything on google for those values, as they are not being set by anything specific to anything specific.