What application are you running that issues the return-code.
There are several utility applications (IDCAMS, IEFBR14) which will allow you to pass cond-codes via JCL - I believe. I think if you try and delete a non-existant file using IEFBR14 (DISP=OLD,DELETE), it will finish, but issue a condition code. I think you can issue a cond-code using input values for IDCAMS also.
If it's a COBOL, FORTRAN, PL1, etc. program, you can imbed logic in the code to generate a cond-code via the JCL. In COBOL, I think if you set the CONDCODE or RETURN-CODE (- system reservered word), this value will be passed via the JCL.
I haven't worked in this arena in a while, but my memory seems to think this is how it can be done.
Regards
MM
----------------------------
just a little more detail ...
In a COBOL program:
<pre> MOVE 4 TO RETURN-CODE.
GOBACK.</pre>
In ASSEMBLER, set register 15 to the value you want as RC:
<pre> LA 15,4
BR 14</pre>
In some IBM utilities, like IDCAMS you can force the RC (this one sets the "condition code to 0) (cond code same as return code):
<pre>
//STEP00 EXEC PGM=IDCAMS
//SYSIN DD *
DELETE 'PRATTST.FILOUT.DBA131'
SET MAXCC = 0
/*
</pre>
in a CLIST & REXX , specify the RC on the EXIT stmnt:
EXIT CODE(&RETCD)