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



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

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

Postby Robert Sample » Mon Sep 10, 2012 12:49 am

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.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

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

Postby BillyBoyo » Mon Sep 10, 2012 1:04 am

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

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

Postby dick scherrer » Mon Sep 10, 2012 2:10 am

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".
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

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

Postby nishantsinghal » Mon Sep 10, 2012 2:26 pm

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
nishantsinghal
 
Posts: 11
Joined: Tue Oct 06, 2009 8:09 pm
Has thanked: 1 time
Been thanked: 0 time

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

Postby BillyBoyo » Mon Sep 10, 2012 2:39 pm

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?

These users thanked the author BillyBoyo for the post:
nishantsinghal (Tue Sep 11, 2012 7:23 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post