I want to stop the process in icetool when dataset is empty and set return code 4
I am using the following code.
SORT FROM(GESAIN) TO(ZWI1) USING(REPG)
SORT FROM(ZWI1) TO(GESAMT) USING(TOTA)
in this example processing stops and the step ends with a return code 12
when I use count from(othin) empty rc4
I get the information that the dataset is empty but processing continues.
my question is.
how can I set return code 4 and stop further processing.
Instead of jamming everything into one step just so that you can use ICETOOL (or using ICETOOL just so you can jam everything into one step) make it separate steps. You can then set RC/CC to a (lmiited number of) values using NULLOUT and/or NULLOFL. Then you can test using a JCL IF (or COND).