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

How to run the JCL from third step skipping first two steps


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Thu Aug 31, 2006 2:26 pm
Reply with quote

Hi Friends,

I have the following doubt..

There is a JCL which has a condition parameter in its first. I just want to know what will be the impact of this condition parameter to that step?
Will the Cond., parameter will be considered or ignored?
Pls let me know...

Also I have another doubt.. I want to run the JCL from third step skipping first two steps.. How to code COND parameter for this..
Pls., help me.. Even if it already answered , pls reply me with answers...

Thanks in Advance
Srinath
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Thu Aug 31, 2006 2:51 pm
Reply with quote

Hi Srinath,

Quote:

There is a JCL which has a condition parameter in its first


In the first step what condition you added?

Quote:

want to run the JCL from third step skipping first two steps

You can use "restart=step3" to skip first 2 steps. It definitely skips the first 2 steps.
Back to top
View user's profile Send private message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Thu Aug 31, 2006 2:56 pm
Reply with quote

Oh! does it matters the condition we use??
what I felt is, it being the first step.. what ever condition we use, it wont be considered.. Am I not right??

Hey then, I dont want the RESTART parameter in the Job Card. I want COND parameter(can be at Job level or Step level). But I am not sure where to use.. and How to code and what to code??

Have I cleared??
Pls., answer me..

Thanks In Advance,
Srinath.
Back to top
View user's profile Send private message
stly
Warnings : 1

New User


Joined: 25 Jul 2005
Posts: 93

PostPosted: Thu Aug 31, 2006 3:00 pm
Reply with quote

Quote:


As for as my knowledge is concerned the cond parameter in teh step1 will be ignored.



i think u can not skip the first step with cond parameter.u have to use RESTART as suggested by surya.

correct me if i m not correct
Back to top
View user's profile Send private message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Thu Aug 31, 2006 3:07 pm
Reply with quote

Surya and Stly Thanks a lot...But pls can anyone check and tell if the First step will be considered or Ignored!!
Srinath.
Back to top
View user's profile Send private message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Thu Aug 31, 2006 3:11 pm
Reply with quote

Sorry its me again.. The real cause for the confusion is ..
Take for eg., a JCL

//step1 exec pgm=xyz,cond=(0,le)

In this line of code, what kind of solution will I be getting.. Cudnt digest with the solution I am provided with.. Pls., excuse me Friends..

Thanks in Advance
Srinath.
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Thu Aug 31, 2006 3:45 pm
Reply with quote

Hi Srinath,

Code:

//step1 exec pgm=xyz,cond=(0,le)


In the above code your step1 will execute because if this is the first step.
If this is not the first step then it will take the previous step's return code.
Back to top
View user's profile Send private message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Thu Aug 31, 2006 3:55 pm
Reply with quote

THanQ Surya..So the conclusion is.. The first step gets executed irrespective of the Condition code..
ThanQ Friends..
Back to top
View user's profile Send private message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Thu Aug 31, 2006 3:58 pm
Reply with quote

Ok but what abt the other Question I raised.. i.e I want to restart the Job from third step.. but I dont want to use the Restart parameter in the job card.. Instead I want to use the COND parameter.. So how to use the COND parameter for this?
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Thu Aug 31, 2006 6:01 pm
Reply with quote

Srinath,

If you want to skip steps using cond parameter.
Write one dummy step.

Code:

//STEP00   EXEC PGM=IEFBR14
//SYSIN    DD DUMMY       
//SYSOUT   DD SYSOUT=*     
//*               
         

add condition to all the steps whichever you want to skip COND=(0,NE,STEP00) and
COND=(0,LE,STEP00) for the other steps which you want to execute.
Back to top
View user's profile Send private message
stly
Warnings : 1

New User


Joined: 25 Jul 2005
Posts: 93

PostPosted: Thu Aug 31, 2006 6:02 pm
Reply with quote

srinathangya wrote:
Ok but what abt the other Question I raised.. i.e I want to restart the Job from third step.. but I dont want to use the Restart parameter in the job card.. Instead I want to use the COND parameter.. So how to use the COND parameter for this?


if u want to skip with cond u have code step00 with dummy and then u can skip others.

here is the code

//STEP00 EXEC PGM=IEFBR14
//SYSIN DD DUMMY
//SYSOUT DD SYSOUT=*
//*
//STEP01 EXEC PGM=IEFBR14,COND=(0,LE,STEP00)
//DD1 DD DSN=xxxxxxxxxxxxxxxx,
// DISP=(OLD,CATLG,DELETE),
// SPACE=(CYL,(1,1),RLSE),UNIT=SYS
// DCB=(LRECL=5,BLKSIZE=0,RECFM=FB
//SYSOUT DD SYSOUT=*
//*
//STEP02 EXEC PGM=IEFBR14,COND=(0,LE,STEP00)
//DD1 DD DSN=xxxxxxxxxxxxxxxyyyyyy,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(1,1),RLSE),UNIT=SYS
// DCB=(LRECL=5,BLKSIZE=0,RECFM=FB
//SYSOUT DD SYSOUT=*
//*
//STEP03 EXEC PGM=IEFBR14,COND=(0,NE,STEP00)
//DD1 DD DSN=yyyyyyyyyyyyy,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(1,1),RLSE),UNIT=SYSDA,
// DCB=(LRECL=5,BLKSIZE=0,RECFM=FB)
//SYSOUT DD SYSOUT=*
//*

here third step will execute skipping the other two.
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
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
No new posts CA7 deleting files in steps after job... CA Products 4
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Forcing a step to run (even if abended) JCL & VSAM 8
Search our Forums:

Back to Top