View previous topic :: View next topic
|
Author |
Message |
Roland Brosio
New User
Joined: 26 Jul 2013 Posts: 7 Location: Germany
|
|
|
|
hello,
I want to stop the process in icetool when dataset is empty and set return code 4
I am using the following code.
[/code]
SORT FROM(GESAIN) TO(ZWI1) USING(REPG)
SORT FROM(ZWI1) TO(GESAMT) USING(TOTA)
SORT FROM(KDIN) TO(ZWI1) USING(REPV)
SORT FROM(ZWI1) TO(KDREP) USING(TOTA)
SORT FROM(FITSIN) TO(ZWI1) USING(REPF)
SORT FROM(ZWI1) TO(FITSREP) USING(TOTA)
COUNT FROM(OTHIN) EMPTY
SORT FROM(OTHIN) TO(ZWI1) USING(REPO)
SORT FROM(ZWI1) TO(OTHREP) 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.
thanks for the answer. [/quote][/list] |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
unfortunately <sort> ( any flavour IIRC ) feels that it is it' s duty to read every record of all the input files
if the process is resource intensive
You might want to add one/more steps to check if any of the input files are empty
and skip the resource hogs |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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).
This will also benefit you in restart situations. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
As an aside, you probably have MODE STOP by default, from your description of the EMPTY giving you RC 12 and ending the step.
MODE STOP catches RC 8, 12 and 16.
If you change your EMPTY to RC8, you'll probably get what you think you want. |
|
Back to top |
|
|
Roland Brosio
New User
Joined: 26 Jul 2013 Posts: 7 Location: Germany
|
|
|
|
thank you for the answer.
I solved it by splitting in 2 steps. |
|
Back to top |
|
|
|