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

I want to execute only step20 to step40 in a JCL


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

New User


Joined: 07 Jun 2006
Posts: 5
Location: Chennai

PostPosted: Wed Jun 07, 2006 2:26 pm
Reply with quote

Hello World of Mainframes !!

I am new member and very glad to be a part of this Forum.

I am beginner . . Today we are asked a question i.e.,

There is a JCL containing 100 steps
i want to execute the steps from
step20 to step40 How can i do that ??

Please gimme the solution

Thank U
Back to top
View user's profile Send private message
nagappaankad

New User


Joined: 20 Feb 2006
Posts: 1
Location: Bangalore

PostPosted: Wed Jun 07, 2006 4:54 pm
Reply with quote

Restart from step 20 and code null statement after step 40. I hope this will do.

Nagappa S Ankad.
Back to top
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Wed Jun 07, 2006 5:25 pm
Reply with quote

Hi,
You might like to use restart and cond in your job.
This will do it.

This has been discussed in this forum before.

so, please search the forum before posting a question icon_smile.gif

Thanks,
Parikshit
Back to top
View user's profile Send private message
Connect_G

New User


Joined: 07 Jun 2006
Posts: 5
Location: Chennai

PostPosted: Thu Jun 08, 2006 1:23 pm
Reply with quote

Thank you Parikshit . .
i too thought the same . .
and here is a better solution i think

solution . . .

This can be done by using the predefined utilities
IEBEDIT & INTRDR
this is the JCL

// JOB . . .
//STEP1 EXEC PGM=IEBEDIT
//SYSUT1 DD DSN=A.PDS(M1),DISP=SHR
//SYSUT2 DD SYSOUT=(*,INTRDR)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
EDIT TYPE=INCLUDE,STEPNAME=STEP20-STEP30
/*


WE CAN ALSO EXECUTE ONLY REQUIRED STEPS

//SYSIN DD *
EDIT TYPE=INCLUDE,STEPNAME=STEP3,STEP50,STEP20
/*


IN THE EDIT TYPE WE CAN USE "EXCLUDE" ALSO FOR EXCLUDING THE REQUIRED STEPS FROM EXECUTION

//SYSIN DD *
EDIT TYPE=EXCLUDE,STEPNAME=STEP100,STEP20 (OR) STEP20-STEP30
/*
Back to top
View user's profile Send private message
saira_mansoor
Currently Banned

New User


Joined: 05 Apr 2006
Posts: 10
Location: NOIDA

PostPosted: Thu Jun 08, 2006 5:45 pm
Reply with quote

In Jobcard, if we give restart=step20 means, it will execute the steps from 20 onwards, and the // (Null statement) after the 40th step, will terminate the job after executing the 40th step.
Back to top
View user's profile Send private message
cjcpr

New User


Joined: 21 Mar 2006
Posts: 21
Location: USA

PostPosted: Fri Jun 09, 2006 7:24 am
Reply with quote

Connect_G wrote:
Thank you Parikshit . .
i too thought the same . .
and here is a better solution i think

solution . . .

This can be done by using the predefined utilities
IEBEDIT & INTRDR
this is the JCL

// JOB . . .
//STEP1 EXEC PGM=IEBEDIT
//SYSUT1 DD DSN=A.PDS(M1),DISP=SHR
//SYSUT2 DD SYSOUT=(*,INTRDR)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
EDIT TYPE=INCLUDE,STEPNAME=STEP20-STEP30
/*


WE CAN ALSO EXECUTE ONLY REQUIRED STEPS

//SYSIN DD *
EDIT TYPE=INCLUDE,STEPNAME=STEP3,STEP50,STEP20
/*


IN THE EDIT TYPE WE CAN USE "EXCLUDE" ALSO FOR EXCLUDING THE REQUIRED STEPS FROM EXECUTION

//SYSIN DD *
EDIT TYPE=EXCLUDE,STEPNAME=STEP100,STEP20 (OR) STEP20-STEP30
/*


this one seems like a looooooooooong shot. Why can't we have it simple?
Back to top
View user's profile Send private message
Connect_G

New User


Joined: 07 Jun 2006
Posts: 5
Location: Chennai

PostPosted: Fri Jun 09, 2006 2:23 pm
Reply with quote

Even its a long shot its a good solution !!
Back to top
View user's profile Send private message
varun_sharma

New User


Joined: 08 Jun 2005
Posts: 19
Location: new delhi

PostPosted: Fri Jun 09, 2006 3:20 pm
Reply with quote

Hi

Instead of this complex JCL simply use Restart for Step 20 and from there onwards use COND or if-and-else. Please let me know if you are not able to get me.

Cheers
Varun
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Wed Jul 12, 2006 3:50 pm
Reply with quote

There are basically two approaches to this problem. The first is the quick and easy one in which you just put in the restart and the '//'. That has is problem atic if you chane the steps you want to run a lot. The other is a more permant solutions using condition code logic built into every step or some other tool such as the one mentioned here. They all have their pros and cons. I'd try some and see which you like the best.
Back to top
View user's profile Send private message
sreenivas_mf

New User


Joined: 18 Jul 2006
Posts: 5
Location: hyd

PostPosted: Tue Jul 18, 2006 8:54 pm
Reply with quote

hi,
by using rd(restart definition), cond parameters we can execute the jobs in our required manner
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 Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Fetch data from programs execute (dat... DB2 3
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
No new posts Evaluate variable to execute a jcl step JCL & VSAM 3
No new posts Execute REXX on logon with ISPF CLIST & REXX 3
Search our Forums:

Back to Top