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

a question on restarting steps in jcl.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Mon Feb 01, 2010 11:58 am
Reply with quote

hi all,

please let me know how can we handle the below requirement.


//XXXXXXXX JOB ( ) ,..,..., RESTART = ....

STEP1

..

STEP2
..
STEP3

..
.
.
.
STEP7
..
STEP8
..
..
STEP20
//

requirement : Need to run only step2 and step7.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Feb 01, 2010 12:33 pm
Reply with quote

Use IEBEDIT
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Feb 01, 2010 1:00 pm
Reply with quote

Code:

//STEP0001 EXEC PGM=IEBEDIT                                       
//SYSUT1   DD   DISP=SHR,DSN=HLQ.JCL.PDS(MEMBER)         
//SYSUT2   DD   SYSOUT=(*,INTRDR)                                 
//SYSPRINT DD   SYSOUT=*                                           
//SYSIN    DD   DATA                                               
  EDIT TYPE=INCLUDE,STEPNAME=(STEP2,STEP7)                   
/*                                                                 
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Feb 01, 2010 1:28 pm
Reply with quote

Or search the forum as this HOMEWORK question appears quite frequently.
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Mon Feb 01, 2010 2:01 pm
Reply with quote

Sambhaji. this is a very good code provided by you.

I wanted to know if this can be achieved using RESTART and COND parameter in the existing JCL.


EXPAT : Sure i will search for this logic in homework threads.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Feb 01, 2010 2:03 pm
Reply with quote

Mukesh Pandey wrote:
I wanted to know if this can be achieved using RESTART and COND parameter in the existing JCL.

Yes it can, hence my suggestion to search the forum
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Mon Feb 01, 2010 2:21 pm
Reply with quote

Sure expat.. i will search the forum..
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Feb 04, 2010 11:38 am
Reply with quote

expat, i could not find this particular requirement in forum. could you please spend your valuable time in providing a solution for this.....

this is to be done using restart and cond code logic...


Thank you,
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Feb 04, 2010 12:24 pm
Reply with quote

OK, so going back to the JCL reference manual ..................

It will show you how to perform a step restart for either a PROC or instream JCL.

OK, so now the part about the steps that you do not wish to run. For each step, or procstep, you will need to code the correct condition code checks for each of those steps.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Feb 04, 2010 12:25 pm
Reply with quote

Quote:
this is to be done using restart and cond code logic...


WHY ?

answer... because that' s the requirement
comment ... **** the requirements icon_biggrin.gif
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Feb 04, 2010 12:34 pm
Reply with quote

Though no production support team will accept this..
I assume its purely homework

Code:

//XXXXXXXX JOB ( ) ,..,..., RESTART =STEP2

STEP1

..

STEP2
..
//SKIP1 IF (STEP2.RC < 0) THEN   
STEP3

..
STEP4
.
STEP5
.
.
//ENDSKIP1 ENDIF
STEP7
..
//SKIP2 IF (STEP7.RC < 0) THEN   
STEP8
..
..
STEP9
//ENDSKIP2 ENDIF
Back to top
View user's profile Send private message
Mukesh Pandey

Active User


Joined: 11 Nov 2008
Posts: 143
Location: India

PostPosted: Thu Feb 04, 2010 1:48 pm
Reply with quote

Thanks Sabhaji.
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Tue Apr 13, 2010 7:07 pm
Reply with quote

Apart from restart = step name( cond & if) and iebedit is it possible to execute a particular step only, for example executing step 6 in the below jcl,


STEP1

..

STEP2
..
STEP3

..
.
.
.
STEP7
..
STEP8
..
..
STEP20
//
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Apr 13, 2010 7:13 pm
Reply with quote

Unless you change the JCL in some way, every step is executed (subject to condition codes and abends) in sequence.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Question for file manager IBM Tools 7
No new posts CA7 deleting files in steps after job... CA Products 4
No new posts question for Pedro TSO/ISPF 2
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts panel creation question TSO/ISPF 12
Search our Forums:

Back to Top