View previous topic :: View next topic
|
Author |
Message |
rexx77
New User
Joined: 14 Apr 2008 Posts: 78 Location: Mysore
|
|
|
|
Greetings!!!
I have a common procedure which is used by different JCL's. The last step in the Proc sends some email to customers.
I have a requirement now to not send any email if the Proc is executed from particular JCL. Please find the example below.
JCL
A
B
C
D
PROC = P
Now i dont want Proc P to send any mail if executed from 'D' JCL. I am ready to add the change in all other three JCLs.
THanks for your help in this. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
So, what's your plan? |
|
Back to top |
|
|
rexx77
New User
Joined: 14 Apr 2008 Posts: 78 Location: Mysore
|
|
|
|
Hi Superk,
I thought of passing some parms from Executing JCLs. But i am not sure how to validate the parm before the email step.
Would appreciate for any new ideas.
Thanks for your time. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hello,
On your JCLs A, B, C, add a dummy step which will have a return code of 0.
say that you added,
STEP01 which returns a RC of 0.
on the common proc, add the COND parameter to your email sending step.
COND=(0,LT,STEP01)
On the D jcl add a step(STEP01) which will have a RC of 4.
This way the mail step will run only for JCLs A B C & not for D.
Hope it helps. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
What is your criterion for distinguishing "JCLs"? If PROD.JCL(A) and OTHER.JCL(B) both contain a job named FOO (even if the jobs are entirely different otherwise) are they considered different?
rexx77 wrote: |
Please find the example below.
JCL
A
B
C
D
PROC = P
Now i dont want Proc P to send any mail if executed from 'D' JCL. |
That's not an example; that's a vague and ambiguous notion. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
actually,
the email step should be a separate proc.
then you can change you jcl to either call both procs or just one. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
A proc is also JCL so what you are saying is you have jcl that calls jcl. But to resolve your problem: make the program name in the last step a symbolic and in your D job set that symbolic to IEFBR14 and in the others whatever your email program is. Or you can do it a complicated way and override the COND for that step, or have 2 procedures - one with the email and one without. So many options and all really fairly simple. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Or one another IEBEDIT Job for the JCL "D" - don't include the e-mail step, in this new Job. |
|
Back to top |
|
|
rexx77
New User
Joined: 14 Apr 2008 Posts: 78 Location: Mysore
|
|
|
|
Hi All,
Thanks All for your valuable time in this.
The solution for the above problem planned is to remove the email step from the Proc and add the step in the JCL itself. So which ever job has to send mail , it will have email step else it will not have any.
this may not be a good idea, but did not had time to do the experiment.
Thanks all again.... |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Thanks for posting the final soultion, you've used... |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
I like your solution. It separates different functionalities (I could have said functions, but that would have been simpler) into their own modules. |
|
Back to top |
|
|
|