Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: How to run the JCL from third step skipping first two steps
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    Post subject: Re: Condition Parameter
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    Post subject: Re: Condition Parameter
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    Post subject: Re: Condition Parameter
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm
No new posts Compilation Error in Translation Step. amitc23 CICS 4 Tue Mar 01, 2016 12:24 pm
This topic is locked: you cannot edit posts or make replies. Executing JCL specific steps at speci... Shruti Takkar JCL & VSAM 6 Mon Feb 22, 2016 12:39 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us