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

Code to execute only particular step in JCL


IBM Mainframe Forums -> FAQ & Basics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anand Dhandapani

New User


Joined: 31 Aug 2007
Posts: 9
Location: Chennai

PostPosted: Wed Sep 12, 2007 11:17 am
Reply with quote

Hi Frenz...
I ve to write a code to execute only particular step in jcl.For example if we ve 10 steps in a jcl i ve to execute only 6th step...Help me on this issue...
Back to top
View user's profile Send private message
amrita.chatterjee

New User


Joined: 27 Apr 2006
Posts: 48
Location: Bangalore, India

PostPosted: Wed Sep 12, 2007 11:32 am
Reply with quote

6 continuous steps?
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Wed Sep 12, 2007 11:33 am
Reply with quote

I think this has been discussed in this forum. Try Search
Back to top
View user's profile Send private message
Anand Dhandapani

New User


Joined: 31 Aug 2007
Posts: 9
Location: Chennai

PostPosted: Wed Sep 12, 2007 2:48 pm
Reply with quote

Thanks frenz...I found the answer from the forum itself...we can do this by using IEBEDIT...
Back to top
View user's profile Send private message
Anand Dhandapani

New User


Joined: 31 Aug 2007
Posts: 9
Location: Chennai

PostPosted: Wed Sep 12, 2007 5:20 pm
Reply with quote

Hi all..
I need some assistance in this topic itself...If we use IEBEDIT we can do this from separate jcl only...I need to execute tat particular step from the same jcl itself(i.e the particular step from a sequence of 10 steps)...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Sep 12, 2007 7:30 pm
Reply with quote

Hello,

IEBEDIT will do what you want. It allows you to execute "from the same jcl itself(i.e the particular step from a sequence of 10 steps)...
".

If this will not do what you want, please clarify.
Back to top
View user's profile Send private message
Anand Dhandapani

New User


Joined: 31 Aug 2007
Posts: 9
Location: Chennai

PostPosted: Wed Sep 12, 2007 7:51 pm
Reply with quote

Hello dick,
I used IEBEDIT in the same jcl where i'm having those 10 steps...But when i submit the job i get two job notifications for the same code...one for IEBEDIT and another for the those 10 steps...First it wil execute only the step i specified in IEBEDIT...But in the next job all the remainin are executing...How to overcome this...
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Sep 12, 2007 8:26 pm
Reply with quote

Hi,

Please post the JCL you used.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Sep 13, 2007 12:11 am
Reply with quote

Hello,

As Anuj requested, please post the JCL you used. . .

It may help if you also post the unsatisfactory jes output(s).
Back to top
View user's profile Send private message
Anand Dhandapani

New User


Joined: 31 Aug 2007
Posts: 9
Location: Chennai

PostPosted: Thu Sep 13, 2007 9:58 am
Reply with quote

Hi all...this is the jcl i used..
//XIND10DA JOB (000),CLASS=E,MSGCLASS=T,NOTIFY=XIND10
//STEPA1 EXEC PGM=IEBEDIT
//SYSUT1 DD DISP=SHR,DSN=TAPG.ANAND.TEST(J034)
//SYSUT2 DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD DATA
EDIT TYPE=INCLUDE,STEPNAME=(STEP4-STEP6)
/*
Followed by 10 steps in which i need to execute one step
//STEP1 EXEC PGM=IEFBR14
.....
//STEP2 ...
....
//STEP10 ... Is there anything wrong in this code...help on this...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Sep 13, 2007 12:50 pm
Reply with quote

Hello,

Quote:
Followed by 10 steps in which i need to execute one step
//STEP1 EXEC PGM=IEFBR14
.....
//STEP2 ...
....
//STEP10 ... Is there anything wrong in this code...help on this...
These 10 steps should not be included inline. SYSUT1 of the IEBEDIT step should point to the pds(mbr) containing the job which runs these 10 steps.

Also to run step 5 only, the control state ent would be
Code:
EDIT TYPE=INCLUDE,STEPNAME=(STEP5)
Back to top
View user's profile Send private message
Anand Dhandapani

New User


Joined: 31 Aug 2007
Posts: 9
Location: Chennai

PostPosted: Thu Sep 13, 2007 2:59 pm
Reply with quote

Hi Dick...
I get wat u said but my doubt is, any possiblity to include IEBEDIT in the same jcl itself..Anyway thanks for all...I saw in this forum itself without IEBEDIT we can use label to execute particular sequence of steps from a number of steps(eg.executing only 4-6 from 10 steps)...
But i cant clearly get tat anybody used this method can explain me pls...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Sep 13, 2007 6:20 pm
Reply with quote

Hello,

It looks like you are spinning your wheels.

If you want to run only 1 step (and not change the existing jcl/job), you can easily
use RESTART with a COND=
or
use IEBEDIT naming the step.

If you want to run multiple steps (and not change the existing jcl/job), you can use IEBEDIT and name the steps to be run - they may or may not happen to be consecutive.

To do what you want without modifying the existing jcl/job, you do not need any other way to do this.
Back to top
View user's profile Send private message
Anand Dhandapani

New User


Joined: 31 Aug 2007
Posts: 9
Location: Chennai

PostPosted: Thu Sep 13, 2007 6:35 pm
Reply with quote

Thanks Dick...I did it with RESTART parameter in job card...I actually try to know wat are all the different ways to handle this issue...Its enough i think...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Sep 13, 2007 7:01 pm
Reply with quote

You're welcome icon_smile.gif

It is good to learn more/all of the options available. Makes you much more flexible.

Good luck icon_biggrin.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Sep 14, 2007 12:45 pm
Reply with quote

Anand Dhandapani wrote:
...I actually try to know wat are all the different ways to handle this issue...
If you could add this line in your first post, then Dick's second last reply would have come enough early.

However, I hope you got what you were looking for. icon_smile.gif
Quote:
Its enough i think...
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 -> FAQ & Basics

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top