View previous topic :: View next topic
|
Author |
Message |
Connect_G
New User
Joined: 07 Jun 2006 Posts: 5 Location: Chennai
|
|
|
|
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 |
|
|
nagappaankad
New User
Joined: 20 Feb 2006 Posts: 1 Location: Bangalore
|
|
|
|
Restart from step 20 and code null statement after step 40. I hope this will do.
Nagappa S Ankad. |
|
Back to top |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
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
Thanks,
Parikshit |
|
Back to top |
|
|
Connect_G
New User
Joined: 07 Jun 2006 Posts: 5 Location: Chennai
|
|
|
|
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 |
|
|
saira_mansoor Currently Banned New User
Joined: 05 Apr 2006 Posts: 10 Location: NOIDA
|
|
|
|
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 |
|
|
cjcpr
New User
Joined: 21 Mar 2006 Posts: 21 Location: USA
|
|
|
|
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 |
|
|
Connect_G
New User
Joined: 07 Jun 2006 Posts: 5 Location: Chennai
|
|
|
|
Even its a long shot its a good solution !! |
|
Back to top |
|
|
varun_sharma
New User
Joined: 08 Jun 2005 Posts: 19 Location: new delhi
|
|
|
|
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 |
|
|
jasorn Warnings : 1 Active User
Joined: 12 Jul 2006 Posts: 191 Location: USA
|
|
|
|
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 |
|
|
sreenivas_mf
New User
Joined: 18 Jul 2006 Posts: 5 Location: hyd
|
|
|
|
hi,
by using rd(restart definition), cond parameters we can execute the jobs in our required manner |
|
Back to top |
|
|
|