How do I pass a non-zero return code from a COBOL program to the JCL job step that executes it. Or in other words force a job step that executes a COBOL program to end with a specific condition code.
before exiting your pgm. That 8 or whatever you choose becomes the CC for the step that execed your pgm. It can be tested using the JCL COND or IF/THEN/ELSE clauses in subsequent steps.
RETURN-CODE must not be coded in WS; it's called a special register and is treated as a reserved word in COBOL.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.