View previous topic :: View next topic
|
Author |
Message |
kashyani
New User
Joined: 11 Apr 2007 Posts: 5 Location: mumbai
|
|
|
|
Hi,
I need to submit a job in which there are 10 steps.
I have to execute 9th step after the execution of 10th step..
How can i do so..??
I heard we can make the use of IF in JCL . |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
kashyani wrote: |
I have to execute 9th step after the execution of 10th step.
How can i do so..??
|
You can't. Steps are executed in a top-down order only.
kashyani wrote: |
I heard we can make the use of IF in JCL.
|
Yes. See the details here in the z/OS V1R7.0 MVS JCL Reference manual. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
In your process do you want step9 to execute both before and after step10? Your requirement is not very clear. Is this a one-time situation that requires the steps be run out of sequence?
As was pointed out above, jcl executes from the top down.
Your best bet is to create a new set of jcl that will fill the current need.
If this is a long-term requirement, you will want to enhance the jcl to accomodate the alternate ways of processing usng condition codes and possibly IF. (IMHO - if there are different requirements, separate jobstreams would be the way to go). |
|
Back to top |
|
|
kashyani
New User
Joined: 11 Apr 2007 Posts: 5 Location: mumbai
|
|
|
|
Yes i know job will execute in top to bottom manner...
But my require ment is I want to execute step 9 only when step 10 executes successfully. |
|
Back to top |
|
|
raak
Active User
Joined: 23 May 2006 Posts: 166 Location: chennai
|
|
|
|
dick wrote
Quote: |
In your process do you want step9 to execute both before and after step10? Your requirement is not very clear |
u didn't give an answer to this!!
If u want it to execute only once ( i.e. after successful execution of step10 ), then interchange the steps and give an IF condition to check the successful execution of UR step10...
Am i clear?? |
|
Back to top |
|
|
kashyani
New User
Joined: 11 Apr 2007 Posts: 5 Location: mumbai
|
|
|
|
Nah..I can't interchange the steps..
there shud be some other way out. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Run the PROC twice, and cond out the non required steps on the second invocation of the PROC.
// EXEC PROC1
// EXEC PROC1,COND.STEP1=(0,LE),COND.STEP2=(0,LE) ........... |
|
Back to top |
|
|
bhaskar80
New User
Joined: 12 Apr 2007 Posts: 7 Location: bangalore
|
|
|
|
Hello,
you can use DPRTY keyword in the EXEC stmt as follows.
//STEP1 EXEC DPRTY=(15,15)
//SPET2 EXEC DPRTY=(14,15)
//SPET3 EXEC DPRTY=(13,15)
//SPET4 EXEC DPRTY=(12,15)
//SPET5 EXEC DPRTY=(11,15)
//SPET6 EXEC DPRTY=(10,15)
//SPET7 EXEC DPRTY=(9,15)
//SPET8 EXEC DPRTY=(8,15)
//SPET9 EXEC DPRTY=(6,15)
//SPET10 EXEC DPRTY=(7,15)
From the above step1 to step8 executed sequentially, after that step9 will will execute and then step 10 will execute.
If you want u can use COND parameter along with DPRTY in step10 inorder to control the step execution with respect to step9 sucessful execution. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
From the above step1 to step8 executed sequentially, after that step9 will will execute and then step 10 will execute. |
Please post the output from your testing so that we can see how this works. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
Nah..I can't interchange the steps..
there shud be some other way out. |
Nah |
|
Back to top |
|
|
raak
Active User
Joined: 23 May 2006 Posts: 166 Location: chennai
|
|
|
|
Hi Bhaskar
u said
Quote: |
From the above step1 to step8 executed sequentially, after that step9 will will execute and then step 10 will execute. |
I tried this one, but it is not giving me results as u said.. I had two steps and i coded like
STEP1 EXEC PGM=XXXX,DPRTY=(2,2)
STEP2 EXEC PGM=YYYY,DPRTY=(1,2)
And in my STEP1, I am creating a file which is being used as input in STEP2. SO if my STEP2 runs first, it should give me a JCL error since the file is not created.
But my job ran successfully.. So i guess this DPRTY didn't have any effect on my job flow..
Can u explain me the problem?? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Raak,
I think that you have made the same mistake as me. Bhaskar did say that step9 would run before step10, although .... I suspect he may have meant to say that step10 would execute before step9.
What I can not understand is the use of DPRTY. As far as I can remember, and at my age the memory isn't all it used to be the DPRTY is the despatch priority of the job, which is used to determine the importance of the job/step in terms of whether it received more or less system resource.
Most sites ignore this coding. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
This
Quote: |
Nah..I can't interchange the steps..
there shud be some other way out.
|
we may not be able to help with. Why should there be some other way? The system is performing exactly as it is supposed to.
Either the requirement definition is very misleading or there is an entire agenda we have not been made aware of. If kashyani will tell what the steps do by function not by step1, step2, etc, we may be able to offer suggestions on how to do what is needed for successful execution of the job(s).
How does the job know whether "step9" should run in order, run after "step10" or run on both sides? The job could always run the first 8 steps, then send the required remaining steps, in the desired order thru the internal reader. . .
Kashyani still hasn't answered whether the "step9" should run both before and after "step10". The requested output has also not been posted. . . |
|
Back to top |
|
|
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
HI,
Can't we use IEBEDIT to specify which step should be executed as follows??
//IEBEDITJ JOB ACCT,'',CLASS=T,MSGCLASS=T,
// MSGLEVEL=(1,1),NOTIFY=&SYSUID
//STEP0001 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=YOUR.PROC.LIBRARY(PROCNAME),DISP=SHR
//SYSUT2 DD SYSOUT=(*,INTRDR)
//SYSIN DD *
EDIT TYPE=INCLUDE,STEPNAME=(STEP10,STEP9,STEP15)
/*
//
~VAMSI |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Vamsi,
Yes, we could use IEBEDIT and/or several other approaches - but only if we get info on what really needs to happen. So far, very little info has been provided.
Very difficult to offer suggestions when what is needed is not provided. . . |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
shreevamsi wrote: |
HI,
Can't we use IEBEDIT to specify which step should be executed as follows?? |
No. The steps will still execute in their originally coded order. |
|
Back to top |
|
|
|