Page 3 of 3

Re: CallinG REXX thru JCL

PostPosted: Thu Feb 16, 2017 10:19 pm
by willy jensen
You should check return codes when appropriate, certainly after allocations, EXECIO etc - otherwise how can you be sure that you can continue the program mainline? This is not REXX specific, just normal programming practice.
In short return codes (values) in REXX are set
functions sets a variable directly, cc=ListDsi(whatever)
TSO commands and called commands sets the RC variable

But by now we are getting way away from your original question and into how to program using REXX. The REXX manual goes to great lengths to describe keywords, functions, external calls etc, and you must consult that, and do some testing on your own. The TRACE instruction can be your friend, look that up.