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

how to process the stepthat we want leaving all the other.


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

New User


Joined: 14 Feb 2006
Posts: 8

PostPosted: Tue Feb 21, 2006 10:26 am
Reply with quote

hai,
this is venkat hear is small doubt can any one clear that for me.
How to process the step that we want leaving all the other.
while we r coding in a JCL ,if we have nearly 20 steps to execute & if we want to execute only one step (say step03) . can we give any conditional statements to it.
Back to top
View user's profile Send private message
smiley
Warnings : 1

New User


Joined: 08 Feb 2006
Posts: 27

PostPosted: Tue Feb 21, 2006 10:29 am
Reply with quote

we can use COND parameter to skip all the other steps
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Tue Feb 21, 2006 11:35 am
Reply with quote

Hi,
Give RESTART prerameter in job card like 'RESTART=STEP3' and after the 3rd step keep null statement like // . Then it will execute third step and comes out.
If u want to execute particlar steps depending on some conditions then use COND perameter.
Back to top
View user's profile Send private message
kumaresh.M

New User


Joined: 17 Feb 2006
Posts: 64
Location: Bangalore

PostPosted: Wed Feb 22, 2006 11:04 am
Reply with quote

we can use the RESTART parameter to do this,
make sure that we can code the restart parameter in JOBCARD,
and further control of steps u use that COND PARAMETER

WITH REGARDS

KUMARESH.M
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Feb 24, 2006 8:23 am
Reply with quote

Here's the way it's done:

Code cond=(0,le) in the job card; also code restart=step/you/want/to/exec.

The 1st step you exec is the restart step and all the others following are by-passed due to the cond in the job card.
Back to top
View user's profile Send private message
Ayyappan

New User


Joined: 05 Jul 2005
Posts: 31
Location: India

PostPosted: Fri Feb 24, 2006 10:53 am
Reply with quote

Hi Jack,

But if the return code of the executed step is greater than 0, then i guess, the other steps will get executed.

Please correct me if i am wrong.

Thanks.
Ayyappan
Back to top
View user's profile Send private message
rajesh_1183

Active User


Joined: 24 Nov 2005
Posts: 121
Location: Tadepalligudem

PostPosted: Fri Feb 24, 2006 11:34 am
Reply with quote

Hi,
try this...........
Code:

       //EDIT3    JOB  ...
      //STEP1    EXEC PGM=IEBEDIT
      //SYSPRINT DD  SYSOUT=A
      //SYSUT1   DD  DSNAME=....
      //SYSUT2   DD  DSNAME=....
      //SYSIN    DD  *
             EDIT    START=JOBname,TYPE=INCLUDE,STEPNAME=(STEPNAMES which u want to execute each seperated by comma)
      /*




corrections welcomed...............

Thanks,
Rajesh[/url][/code]
Back to top
View user's profile Send private message
meenasomu

New User


Joined: 15 Sep 2005
Posts: 17

PostPosted: Fri Feb 24, 2006 1:17 pm
Reply with quote

Hi Ayyappan,

Yes if the return code is greater than zero, then the step will get executed.
So, we can use something like this.


Code:


Proc PROC1 has five steps STEP01,STEP02,STEP03, STEP04 and STEP05.

//JOBA  JOB ...,RESTART=PRSTEP.STEP03
//PRSTEP EXEC PROC1,
//       COND.STEP04=(0,GE),
//       COND.STEP05=(0,GE)





Hope this will work to exec only step3 of the proc proc1. Please correct me if i'm wrong.

Thanks,
Meena.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Feb 25, 2006 5:20 am
Reply with quote

Hi Ay,

No. COND=(0,LE) reads this way: if 0 is less than or equal to a RC passed by any previous step in the job don't exec this step.

Each step in the job tests for this. If the restarted step passes a RC of 12, 0 is less than 12 so no following step executes.

Steps can't issue negative RCs.

P.S. I've used this many times - it's not just a guess.
Back to top
View user's profile Send private message
kaarthik6_mf

New User


Joined: 27 Feb 2006
Posts: 3

PostPosted: Mon Feb 27, 2006 12:07 pm
Reply with quote

Hi
I have faced this question at an interview I was happy to find a very high-level and nice solution for this Rajesh_1183,Can i contact you for more details whever needed.
Thanks
Kartik.FR
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Feb 28, 2006 8:07 am
Reply with quote

Hi Kartik.FR,

Why not share your knowledge with all members. That's what this Forum is all about.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Wed Mar 01, 2006 8:30 am
Reply with quote

This question continues to appear here without sample JCL provided. It is almost never that easy to just run one step of a job as the fact of prior dataset dependecies or restoration to needed state are never addressed.

If a temp dataset is created in a prior step and is needed in the executed step, it will not be available. If a temp dataset is created in executed step and needs further processing and cataloging in a subsequent step, it is not processed/cataloged. If an updated dataset/database table needs restoration to its prior state, it is not restored.

I worked at places where all QSAM data sets created within the job were passed until the very last step where they were cataloged or discarded. Jobs were limited to roughly 45 minute runs so reruns were manageable.

In most places that I've been a special job is created as a one-time execution.

Perhaps it's me, but this interview question is meaningless. I chuckle to myself every time I see these posts.
Back to top
View user's profile Send private message
sonu_winks

New User


Joined: 23 Nov 2005
Posts: 23

PostPosted: Wed Mar 01, 2006 11:26 am
Reply with quote

i dont think that we need to complicate things,most of the time we want to achieve this for testing by modifying only the job card.
Jack has the simple and most straight forward soln for this..that works perfectly.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Mar 02, 2006 6:04 am
Reply with quote

Hi David,

I've used this when a del/define step or an IEFBR14 is a few steps away from the one I want to restart from, but I need the file fixed first.

It comes in handy and it's quick.
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 process statement for SUPREC, CMPCOLM... TSO/ISPF 4
No new posts How to process dependent file based o... JCL & VSAM 8
No new posts Bind process DB2 4
This topic is locked: you cannot edit posts or make replies. How to process gdg in rexx program wh... CLIST & REXX 12
No new posts Process Last Key of a record based on... DFSORT/ICETOOL 5
Search our Forums:

Back to Top