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



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

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

Postby nishantsinghal » Sun Sep 09, 2012 6:12 am

Hi Mainframes,

a jcl is having 5 steps. i have added a condition on step 5 ie cond=(7,GE,STEP2). Now i want step2 should return more than 7 so that step5 can execute.

And i can not make any changes in the cobol program.

Please share your thoughts.

Regards,
Nishant Singhal
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 Robert Sample » Sun Sep 09, 2012 6:42 am

Assuming, since you did not specify, that the COBOL program is executing in STEP2 you have several choices:
1) replace the COBOL program for testing with a utility that sets the return code to 8 or higher
2) change the COBOL program for testing to include MOVE 8 TO RETURN-CODE just before the program exits
3) put the change into production without testing
4) replace the COBOL program with a stub program for testing that just moves 8 to RETURN-CODE and exits

There may be other solutions but since you did not specify enough information to make clear what you want, and why, that's about all that can be said.
Robert Sample
Global moderator
 
Posts: 3719
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 » Sun Sep 09, 2012 1:03 pm

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?
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 NicC » Sun Sep 09, 2012 2:35 pm

Or, for testing, replace the COBOL program with IDCAMS and provide SET MAXCC=whatever so that IDCAMS will set a return code of 'whatever'
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

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

Postby nishantsinghal » Sun Sep 09, 2012 10:30 pm

Thanks all for your valuable suggestions....

bt i hv limited access to system.....actually i have made the changes in production JCL and i want to test that jcl before moving it to production.

I am not allow to touch the cobol code and and step 2 must have the same cobol program which is in prodution. Why, i want the same pgm at step2 because i hv to attach the job log of test run in my project management docs so that they can approve the same.

If you want the JCL for step2 then that i can provide you.

Please help me out to get it done.

Thanx
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 dick scherrer » Sun Sep 09, 2012 10:37 pm

Hello,

Create a test program with the same name as the "real" one (could be the same code and all with the addition of forcing the rc you want). Run your test and hang onto the JOB Log. Re-compile the real program and move on.

Re-reading your post, how do you intend to get the working process into production if you are not allowed to change the program of step 2? In other words, what will set the rc when step 5 is to be bypassed?

Hopefully you have misunderstood the "rules" or you need somone more qualified making assignments. . .
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 » Sun Sep 09, 2012 10:51 pm

Dick,

actually step5 of a jcl is having a proc for sending email of abnormal termination.
Currently, step5 is executing either previous step executes successfully or not. So i have added a cond on step5 and
i want to test the jcl with my changes.

Again, i want to make it clear that i can not make any chnges in cobol pgm and i hv to use same loadlib of production in my test jcl.

is it clear or still having doubts. Plz let me know
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 dick scherrer » Sun Sep 09, 2012 10:59 pm

Hello,

I don't have any doubts. However, people in your organization have confusion. . .

You cannot do what you want without changing the program to set the new return code. If you continue to insist you want the program to work differently without changing it, you best get ready to manage the disappointment of whoever made such an assignment.

I have never seen a program start doing something new without the code being changed. Maybe someone in your organization can explain how they believe this might be accomplished (unchanged code doing something new).
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 BillyBoyo » Sun Sep 09, 2012 11:03 pm

I don't get it. Either the program can produce a non-zero RC or it can't.

If it can, make it so.

If it can't, then point that out to someone and get the "requirement" changed. Same program, same loadlibary, program can't get a RC of greater than 7, can't do this requirement.

Also, you are talking about two things. RC > 7 and "abnormal termination".

There is nothing "abnormal" about non-zero return-codes.

An "abnormal termination" is an abend, and the COND you have coded will not "catch" it, so no e-mail will b sent.
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 nishantsinghal » Sun Sep 09, 2012 11:38 pm

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.

Abnormal termination is content of mail to notify the audiences for failure of job.
nishantsinghal
 
Posts: 11
Joined: Tue Oct 06, 2009 8:09 pm
Has thanked: 1 time
Been thanked: 0 time

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post