Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Condition code in JCL jobcard

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Condition code in JCL jobcard
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

Active Member


Joined: 08 May 2006
Posts: 992
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Dec 04, 2009 7:29 pm    Post subject:
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    Post subject:
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: 1703
Location: Australia

PostPosted: Mon Dec 07, 2009 11:16 am    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts CA Workload Automation event code help vinu78 CA Products 10 Wed Mar 01, 2017 10:05 am
No new posts Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am
No new posts MAX-RC 88 and Return code 606 in DFH0... lind sh CICS 2 Tue Jan 24, 2017 1:23 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us