TheSilverFox wrote:I get a return code of zero. BUT, when i try to run the program....I get this JCL Error:
ABEND=S0C1 U0000 REASON=00000001 868
First, I strongly recommend that you enclose all JCL, code, sysout, and anything where alignment may be significant in Code tags
so that it looks like this.
Note that this preserves multiple spaces, which are not in ordinary text.
Second, note that the return codes of the compile and link steps have nothing to do with the retun code (or abend code) of program; it is perfectly possible to compile and link a program that could never run.
Third, although a S0C1 indicates an operation exception (that is, an attempt to execute an invalid machine operation), the link-editor will produce bad machine code; this is a case of your program in memory being overlaid with data. An abend of this sort is curdled misery to debug; recompile with subscript range checking, initialize pointers to a known value (in my shop we use X'DEAD2BAD') to make them easy to spot in the dump, and hope that the data causing the problem aren't in the five millionth input record.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day