Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
Hi members, I've a doubt and I hope that your various knowledge may help me to solve it.
All of us know that in a JCL we can code as disposition for an abnormal termination the DELETE but when we use IDCAMS utility to do a repro and for various case(except a Jcl Error) happen an error for a wrong blocksize or a duplicate key(etc.) we can only have as Max Rc 12/16, so my question is: how can we terminate abnormally the step avoiding(i.e. the allocation) the allocation of the file?
In this moment the only solution I can see is a SB37 caused with a test on the MaxCc but I'd like to know if another method exist to do the same.
Joined: 22 Sep 2005 Posts: 104 Location: Concord, New Hampshire, USA.
Hi,
Do you need to avoid allocation of output file(if it can't accomodate all records from input file) on REPRO? If yes, go for MODAL command IF-THEN-ELSE and check the return code of REPRO using LASTCC and DELETE the output file,if necessary. Job may be terminated immediately by setting MAXCC/LASTCC = 16.
Regards,
Sridevi.
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
Hi Sridevi, thanks to your reply I know the MCD but this method work only for Non GDG dataset(in my case I try to save 18 gdg... and you can uderstand that I cannot insert the correct level every time).
I apologize to you but I miss this detail.
Joined: 22 Sep 2005 Posts: 104 Location: Concord, New Hampshire, USA.
Hi Mgindaco,
Your prior mail talks about avoiding the allocation of dataset and the current mail is about saving the 18 gdg.What do you want to convey from "I cannot insert the correct level every time"?Please let us know your JCL code and brief explanation on what you are looking for in it.
Regards,
Sridevi.
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
Dear Sridevi, what I want to do is avoid the allocation of a set of file
if one of this allocation has a condition code of IDCAMS greater than 0,
and for this I thought to a form of abend(as the title suggest).
This means, as you suggested, that surely I must test the Last Condition
code to check the outcome of IDCAMS statement.
I think that both for GDG that for other kind of file your method function
but particularly for GDG an exception is done for the generation/level number.
Now, if an error happen in the first repro, using an if-then-else I can solve the problem.
But in the other case? What can I do to avoid the allocation of GDG?
It's for this reason that I'm looking for an Abend or a kind of user exit of IDCAMS to
solve my problem.
I must apologize for my confused explanation, and if is still not clear I hope in your patience.