IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Condition code in JCL jobcard


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sachin Ghadage

New User


Joined: 06 Nov 2009
Posts: 3
Location: pune

PostPosted: Fri Dec 04, 2009 5:48 pm
Reply with quote

Hi All,

I need help in JCl.
In my job card has condition:-
// COND=((10,EQ),(99,EQ),(20,EQ))

So any of the step got RC 10 or 99 or 20 then job stops at that step.My requirement is once job stops I need to send Email notification to concerned email ID.I also have Email step code.But problem is how to put it in PROC.Because once job stops it won't execute subsequent steps.

I tried this way:
If RC.50 = 99
email step
End.
But this didn't work.Obviously because it won't execute once job card condition satisfied.and it bypass remaining steps... icon_sad.gif
Removing job card contions and putting infront of respective steps is not the solution bcause there are so many steps in Proc.
Please help.

Thanks,
vaishali
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Fri Dec 04, 2009 7:29 pm
Reply with quote

Quote:
So any of the step got RC 10 or 99 or 20 then job stops at that step

Job doesn't "stop at that step" because of the cond codes - it bypasses the step and will then perform any check on the next step(s). If there are no further steps eligible to execute, then execution stops.

What does "IF RC.50 = 99" mean? Have you a step named 50 ?

Garry.
Back to top
View user's profile Send private message
karisurya

New User


Joined: 02 Aug 2007
Posts: 64
Location: Bangalore

PostPosted: Mon Dec 07, 2009 10:46 am
Reply with quote

As carol said if a condition is satisfied job will skip the step and not stop there.

In your post you specified you tried to test with below code
Quote:

If RC.50 = 99
email step
End.

R u sure the return code is 99 for previous step.

Other than chekcing the Step name, In the condition code you are checking 3 values and you are testing with one value. The testing will fail if you dont generate appropriate return code which you are checking.

Check it out and let us know if u need further help.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Dec 07, 2009 11:16 am
Reply with quote

Hi,

when COND is specified on the JOBCARD the job stops executing as soon as any test is satisfied.

Quote:
The COND parameter is used to specify the return code tests the
system uses to determine whether a job will continue processing.
The COND parameter on the JOB statement is global in scope for the
entire job.

Before each job step is executed, MVS performs the COND parameter
tests against the return codes from one or more previously completed
job steps. If none of these tests are satisfied, the system
executes the job step; if any test is satisfied, the system skips
ALL remaining job steps and terminates the job immediately.


Gerry
Back to top
View user's profile Send private message
karisurya

New User


Joined: 02 Aug 2007
Posts: 64
Location: Bangalore

PostPosted: Mon Dec 07, 2009 12:28 pm
Reply with quote

OOPS, My mistake most of the time i use COND parameter at step level so carried away. If COND parameter is specified in JOBCARD the job stops when condition matches.

Here is what i learnt from IBM Manual about COND over rides
Quote:

Overrides

z/OS V1R10.0 MVS JCL Reference
SA22-7597-12




If you code the COND parameter on the JOB statement and on one or more of the job's EXEC statements, and if a return code test on the JOB statement is satisfied, the job terminates. In this case, the system does not process any subsequent EXEC statement COND parameters.

If the tests on the JOB statement are not satisfied, the system then performs the return code tests on the EXEC statement. If a return code test is satisfied, the step is bypassed.

Back to top
View user's profile Send private message
Sachin Ghadage

New User


Joined: 06 Nov 2009
Posts: 3
Location: pune

PostPosted: Fri Dec 18, 2009 10:44 pm
Reply with quote

Yah,
that means
If RC.STEP50 = 99
email step
End.

But what to do?.. Is there any solution to send email once job stops because of any of the jobcard conditions?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts Monitoring production job progress. N... JCL & VSAM 4
Search our Forums:

Back to Top