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

STEP1 EXECUTE OR NOT QUERY


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

New User


Joined: 11 Oct 2013
Posts: 37
Location: India

PostPosted: Fri Nov 15, 2013 10:30 am
Reply with quote

Dear experts,
As all we know that ibm stated that we cannot bypass first step1 in proc or jcl means step1 will execute regardless wht return code.
But when i run this code it bypasses step1 by using cond =only in step1.
Code:

//SHRDV02T JOB NOTIFY=&SYSUID                           
//STEP1 EXEC PGM=IEFBR14,COND=ONLY                     
//DD1 DD DSN=SHRDV02.DEEPAK.MY,DISP=(NEW,CATLG,DELETE),
//      UNIT=SYSDA,                                     
//      SPACE=(TRK,(10,10),RLSE),                       
//      DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)             
//STEP2 EXEC PGM=IEFBR14                               
//STEP3 EXEC PGM=IEFBR14                               
//STEP4 EXEC PGM=IEFBR14                               
//STEP5 EXEC PGM=IEFBR14                               
//STEP6 EXEC PGM=IEFBR14                               
//STEP7 EXEC PGM=IEFBR14                               
//SYSPRINT DD SYSOUT=*                                 
//SYSIN DD *         
                                 

and jcl listing is as follows
Code:

ICH70001I SHRDV02  LAST ACCESS AT 12:55:57 ON FRIDAY, NOVEMBER 15, 2013

IEF202I SHRDV02T STEP1 - STEP WAS NOT RUN BECAUSE OF COND = ONLY       
IEF272I SHRDV02T STEP1 - STEP WAS NOT EXECUTED. [/color]                       
IEF373I STEP/STEP1   /START 2013319.1256                               
IEF374I STEP/STEP1   /STOP  2013319.1256 CPU    0MIN 00.00SEC SRB    0M
IEF142I SHRDV02T STEP2 - STEP WAS EXECUTED - COND CODE 0000           
IEF373I STEP/STEP2   /START 2013319.1256                               
IEF374I STEP/STEP2   /STOP  2013319.1256 CPU    0MIN 00.01SEC SRB    0M
IEF142I SHRDV02T STEP3 - STEP WAS EXECUTED - COND CODE 0000           
IEF373I STEP/STEP3   /START 2013319.1256                               
IEF374I STEP/STEP3   /STOP  2013319.1256 CPU    0MIN 00.01SEC SRB    0M
IEF142I SHRDV02T STEP4 - STEP WAS EXECUTED - COND CODE 0000           
IEF373I STEP/STEP4   /START 2013319.1256                               
IEF374I STEP/STEP4   /STOP  2013319.1256 CPU    0MIN 00.01SEC SRB    0M
IEF142I SHRDV02T STEP5 - STEP WAS EXECUTED - COND CODE 0000           
IEF373I STEP/STEP5   /START 2013319.1256                               
IEF374I STEP/STEP5   /STOP  2013319.1256 CPU    0MIN 00.01SEC SRB    0M
IEF142I SHRDV02T STEP6 - STEP WAS EXECUTED - COND CODE 0000           
IEF373I STEP/STEP6   /START 2013319.1256                               
IEF374I STEP/STEP6   /STOP  2013319.1256 CPU    0MIN 00.01SEC SRB    0M
IEF236I ALLOC. FOR SHRDV02T STEP7                                     
IEF237I JES2 ALLOCATED TO SYSPRINT                                     
IEF237I JES2 ALLOCATED TO SYSIN                                       
IEF142I SHRDV02T STEP7 - STEP WAS EXECUTED - COND CODE 0000           



As we clearly seen listing show step1 is not executed due to condition code.

but every one says step1 always executes regardless of any condition. because it treat first step condition as false and execute step1.
Please give suggestion and your valuable comments.


EF202I SHRDV02T STEP1 - STEP WAS NOT RUN BECAUSE OF COND = ONLY
IEF272I SHRDV02T STEP1 - STEP WAS NOT EXECUTED.

thanks in advance.
Deepak kumar
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Nov 15, 2013 11:16 am
Reply with quote

Dear Deepak,

What is your requirement?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Nov 15, 2013 11:18 am
Reply with quote

Hi,

Quote:
but every one says step1 always executes regardless of any condition. because it treat first step condition as false and execute step1.
Please give suggestion and your valuable comments.



Not everyone

ibmmainframes.com/about2457.html


Gerry
Back to top
View user's profile Send private message
Kmr.deepakcs

New User


Joined: 11 Oct 2013
Posts: 37
Location: India

PostPosted: Fri Nov 15, 2013 1:59 pm
Reply with quote

@pandora
I read in ibm manual that first step of job is always executes bt why it will not run by using cond=only....Can u show some light on this...


Deepak
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Nov 15, 2013 2:56 pm
Reply with quote

Can you provide a link, or example of the relevant text?

COND=ONLY means run the step only if the has been an abend in an earlier step. Since it is the first step, there isn't a previous step, so there hasn't been an abend, so the step does not run.

This may be documented unclearly in the manual, or incorrectly.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Nov 15, 2013 3:16 pm
Reply with quote

And you can always bypass the first step by coding a RESTART parameter.
Back to top
View user's profile Send private message
Kmr.deepakcs

New User


Joined: 11 Oct 2013
Posts: 37
Location: India

PostPosted: Fri Nov 15, 2013 4:18 pm
Reply with quote

Thanks bill and nic. icon_smile.gif you guys are very supporting.
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 RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Query on edit primary command CLIST & REXX 5
Search our Forums:

Back to Top