Page 2 of 2

Re: how to abend step of a job intentionally????

PostPosted: Mon Sep 10, 2012 12:49 am
by Robert Sample
my question is as simple that is their any way to make it possibel by doing that changes in jcl only other thn loadlib and pgm on that step.
No, it is not possible to do this. You must either change the program and recompile it, or change the JCL to use a utility instead of the program.

Re: how to abend step of a job intentionally????

PostPosted: Mon Sep 10, 2012 1:04 am
by BillyBoyo
Is your Cobol program for any reason setting the RETURN-CODE to a value greater than 7?

If it is not, then you will not be able to do what you want.

You can probably make your program abend (abnormal termination) by removing any DD statements in step 2. But that will be an Abend, and your COND as coded will not catch it.

To put it another way, if your Cobol program in step 2 does not on any occasion set a RETURN-CODE of greater than 7, then your step 5 is pointless and will never do anything.

Re: how to abend step of a job intentionally????

PostPosted: Mon Sep 10, 2012 2:10 am
by dick scherrer
Hello,

Which part of "you have to change the code" is not clear? It has been suggested/repeated multiple times.

JCL can test for a particular condition code, but it CANNOT set it for a previous step. If step2 needs to set a particular conditon code, then whatever is the code for step2 needs to be modified to make this happen.

Abnormal termination is content of mail to notify the audiences for failure of job.
You (and probably your organization) are mistaken about what is an "abend". Conditionally executing or not executing some step due to condition codes is NOT an abend - regardless of what your organization wants to call it. There are 2 kinds of abends - Sxxx for "system abends" and Unnnn for "user abends".

Re: how to abend step of a job intentionally????

PostPosted: Mon Sep 10, 2012 2:26 pm
by nishantsinghal
got the solution.....

my collegue suggested me to change the value of parm parameter, after changing parm parameter the job will return code 12 because of invalid value passed to program.

Thanx all

Re: how to abend step of a job intentionally????

PostPosted: Mon Sep 10, 2012 2:39 pm
by BillyBoyo
BillyBoyo wrote:Presumably your Cobol program (if it is that) in the second step can, under some condition, provide a return-code greater than 7.

Presumably you are looking for ideas to test the JCL.

Why not run your program with test data which meets the criteria to produce a return-code greater than 7?


Other than not being able to "mind-read" your code and tell you exactly what to do, you had the solution 24 hours ago :-)

Now, how about also running the job with no DD names in step 2 and see what your step 5 does?