How to set a return code



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

Re: how to set a return code

Postby Anuj Dhawan » Mon Feb 08, 2010 9:02 pm

I am planning to terminate the jcl at the end of step 5 here, if i get a return code of 4.
If return code is zero, i shall continue execution of the jcl.
You might put rest of the steps inside a IF construct which allow the execution of the stpes only when RC=4 of step5.

By the way, if you get RC=4 in step5 - are you able to abend the job? I'm little unsure about the "context" of word abend in your explanations...
Anuj
Anuj Dhawan
 
Posts: 273
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times

Re: how to set a return code

Postby dick scherrer » Tue Feb 09, 2010 12:12 am

Hello,

Please let me know what is the method to terminate an executing JCL without abending it
As i mentioned before:
Possibly they would respond better if you placed the COND= on the individual steps?

I only know 3 ways out of a batch job (unless i've forgotten something)
1. Normal eoj
2. Terminate due to condidion code(s)
3. Abend (User or System)

Suggest you talk with them again and ask what is acceptable to them. . .
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 set a return code

Postby samurai007 » Wed Feb 17, 2010 2:23 pm

Hi,

2. Terminate due to condidion code(s)


Am trying to do something on these lines only.
Can you please elaborate on how this can be achieved ?


By the way, if you get RC=4 in step5 - are you able to abend the job?


Yes !! i am able to abend a job.
But my requirement is to terminate it normally.

Thanks,
Sam.
samurai007
 
Posts: 22
Joined: Mon Jul 20, 2009 10:42 pm
Has thanked: 0 time
Been thanked: 0 time

Re: how to set a return code

Postby expat » Wed Feb 17, 2010 2:51 pm

Well, if the following steps are flushed after condition checking what is the problem ?
expat
 
Posts: 459
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 8 times

Re: how to set a return code

Postby dick scherrer » Thu Feb 18, 2010 1:00 am

Hello,

Yes !! i am able to abend a job.
But my requirement is to terminate it normally.
A return code does not typically cause an abend. What is your definition of "terminate mormally"?
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

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post