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
 

 

STEP1 EXECUTE OR NOT QUERY

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: STEP1 EXECUTE OR NOT QUERY
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

Moderator


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

PostPosted: Fri Nov 15, 2013 11:16 am    Post subject:
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: 1703
Location: Australia

PostPosted: Fri Nov 15, 2013 11:18 am    Post subject:
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

http://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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Fri Nov 15, 2013 2:56 pm    Post subject: Reply to: STEP1 EXECUTE OR NOT QUERY
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: 1712
Location: UK

PostPosted: Fri Nov 15, 2013 3:16 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts SQL Query optimization. arunsoods DB2 12 Sun Sep 04, 2016 6:27 am
No new posts Query on BLSR Nileshkul JCL & VSAM 2 Sat Aug 13, 2016 5:18 am


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