Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to execute 9th step after the execution of 10th step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
kashyani

New User


Joined: 11 Apr 2007
Posts: 5
Location: mumbai

PostPosted: Wed Apr 18, 2007 5:43 pm    Post subject: How to execute 9th step after the execution of 10th step
Reply with quote

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
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Wed Apr 18, 2007 5:50 pm    Post subject: Re: How to execute 9th step after the execution of 10th step
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Apr 18, 2007 9:54 pm    Post subject:
Reply with quote

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
View user's profile Send private message
kashyani

New User


Joined: 11 Apr 2007
Posts: 5
Location: mumbai

PostPosted: Thu Apr 19, 2007 9:43 am    Post subject: Re: How to execute 9th step after the execution of 10th step
Reply with quote

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
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Thu Apr 19, 2007 10:24 am    Post subject:
Reply with quote

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
View user's profile Send private message
kashyani

New User


Joined: 11 Apr 2007
Posts: 5
Location: mumbai

PostPosted: Thu Apr 19, 2007 10:30 am    Post subject: Re: How to execute 9th step after the execution of 10th step
Reply with quote

Nah..I can't interchange the steps..
there shud be some other way out.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8617
Location: Back in jolly old England

PostPosted: Thu Apr 19, 2007 12:36 pm    Post subject:
Reply with quote

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
View user's profile Send private message
bhaskar80

New User


Joined: 12 Apr 2007
Posts: 7
Location: bangalore

PostPosted: Thu Apr 19, 2007 2:08 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8617
Location: Back in jolly old England

PostPosted: Thu Apr 19, 2007 2:14 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8617
Location: Back in jolly old England

PostPosted: Thu Apr 19, 2007 2:15 pm    Post subject:
Reply with quote

Quote:
Nah..I can't interchange the steps..
there shud be some other way out.

Nah
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Thu Apr 19, 2007 3:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8617
Location: Back in jolly old England

PostPosted: Thu Apr 19, 2007 3:47 pm    Post subject:
Reply with quote

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 icon_confused.gif 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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Apr 19, 2007 7:14 pm    Post subject:
Reply with quote

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
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Thu Apr 19, 2007 10:46 pm    Post subject: Re: How to execute 9th step after the execution of 10th step
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Apr 20, 2007 12:55 am    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri Apr 20, 2007 1:29 am    Post subject: Re: How to execute 9th step after the execution of 10th step
Reply with quote

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
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 ROSCOE RPF execution via JCL balimanja CA Products 2 Tue Nov 07, 2017 2:13 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 6 Fri Sep 22, 2017 7:08 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us