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
 

 

COND Parameter doubt

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
poulomi

New User


Joined: 22 Feb 2007
Posts: 6
Location: INDIA

PostPosted: Wed Nov 21, 2007 1:30 pm    Post subject: COND Parameter doubt
Reply with quote

I am having a doubt regarding COND PARAMETER.
Following are the details of the JCL with CONDitions applied to the STEPS of the JCL :
STEPNAME ------ RC
STEP005 ------ NO COND PARAMETER HANDLE
STEP010 ------ COND=(0,NE)
STEP020 ------ COND=(4,LT,STEP010)
STEP030 ------ COND=((4,LT,STEP010),(0,NE,STEP020))
STEP040 ------ ?
NOW STEP040 should run to all conditions where-if the previous steps fails with RC = 00 / 04, this STEP should not FLUSH. & with any other RC return STEP040 should FLUSH.
I have coded
//STEP040 EXEC PGM=XXXX,COND=(4,LT,STEP030)
This fulfills the requirement!
But I had a doubt regarding COND parameter, that, as per my knowledge for any STEP which includes COND parameter like (code, operator{,previous stepname}), it means that if the condition goes false for the previous STEP then only the subsequent STEP should run.
So as per my requirement STEP040 should run with following CODE :
//STEP040 EXEC PGM=XXXX,COND=(4,GT)
But the requirement is not getting done with the above CODE.
Can you please help me out regarding this and correct me if I am wrong regarding COND parameter concept?
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Wed Nov 21, 2007 2:27 pm    Post subject:
Reply with quote

Poulomi,

Quote:
steps fails with RC = 00

Are you sure?

Is it a shop specific setup? I assume 00/04 never mean job/step failure. Please post your requirement clearly and remember we cant read your mind.
Back to top
View user's profile Send private message
poulomi

New User


Joined: 22 Feb 2007
Posts: 6
Location: INDIA

PostPosted: Wed Nov 21, 2007 3:52 pm    Post subject:
Reply with quote

Murali,

Sorry for wrong explaination stated by me.

Actually I wanted to say that :

STEP040 should run in all cases where either of the steps viz. STEP005, STEP010, STEP020, STEP030 returning RC= 00/04.

& STEP040 should FLUSH in case either of the stpes viz. STEP005, STEP010, STEP020, STEP030 returning RC > 04.

For the above requirement I thought that code

//STEP040 EXEC PGM=XXXX,COND=(4,GT)

should ideally work.

But I got the requirement done with

//STEP040 EXEC PGM=XXXX,COND=(4,LT,STEP030) .

I just wanted to clarify my knowlenge regarding COND PARAMETER.

Is it that?

Any STEP which includes COND parameter like (code, operator), it means that if the condition goes false for the previous STEP then only the subsequent STEP should run.

((If the above statement is true then I should get the requirement done by
//STEP040 EXEC PGM=XXXX,COND=(4,GT).))

Or am I going wrong with the concept as here its working on the other way i.e.

Any STEP which includes COND parameter like (code, operator{,previous stepname}), it means that if the condition goes true for the previous STEP then only the subsequent STEP should run.


Hope I am clear with my doubt.

Regards,
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Wed Nov 21, 2007 3:55 pm    Post subject: Reply to: COND Parameter doubt
Reply with quote

why not use the "// IF" jcl statement
it will simplify and make happier ( from an IT point of view ) everybody' s life
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Thu Nov 22, 2007 6:23 am    Post subject:
Reply with quote

poulomi wrote:
//STEP040 EXEC PGM=XXXX,COND=(4,GT)

should ideally work.



It shouldn't work. Because this means if 4 is GREATER than any previous return code, then don't run STEP040.

So if STEP030 ends with 00, 01, 02, 03 then STEP040 doesn't run.

Hope it clears your doubt.
Back to top
View user's profile Send private message
poulomi

New User


Joined: 22 Feb 2007
Posts: 6
Location: INDIA

PostPosted: Thu Nov 22, 2007 10:33 am    Post subject:
Reply with quote

Thank you.

It helped me out.
Back to top
View user's profile Send private message
poulomi

New User


Joined: 22 Feb 2007
Posts: 6
Location: INDIA

PostPosted: Thu Nov 22, 2007 12:30 pm    Post subject:
Reply with quote

Sorry for the last post!

Wanderer Stated :-

Quote:
//STEP040 EXEC PGM=XXXX,COND=(4,GT)

It shouldn't work. Because this means if 4 is GREATER than any previous return code, then don't run STEP040.

So if STEP030 ends with 00, 01, 02, 03 then STEP040 doesn't run.


As per your STATEMENT If in previous steps RC > 4 ,STEP040 should not run.
That implies if previous STEPs returns 00, 01, 02, 03, 04 then STEP040 should run.

This is the CONDition which is satisfies my requirement in the JCL!

But actually its working in the reverse case!
//STEP040 EXEC PGM=XXXX,COND=(4,LT,STEP030)


Ur help is still needed!
Regards,
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Nov 22, 2007 1:39 pm    Post subject: Reply to: COND Parameter doubt
Reply with quote

poulomi,

Quote:


wanderer stated

//STEP040 EXEC PGM=XXXX,COND=(4,GT)

It shouldn't work. Because this means if 4 is GREATER than any previous return code, then don't run STEP040.



This is correct

Quote:
So if STEP030 ends with 00, 01, 02, 03 then STEP040 doesn't run.


This is wrong.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Nov 22, 2007 1:44 pm    Post subject: Reply to: COND Parameter doubt
Reply with quote

Poulomi,

COND parameter has been discussed so many times in this forum. Do search for examples.

As suggested use ??IF .Also Check this similar topic.

http://ibmmainframes.com/viewtopic.php?t=25666
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Fri Nov 23, 2007 7:12 am    Post subject:
Reply with quote

poulomi wrote:

As per your STATEMENT If in previous steps RC > 4 ,STEP040 should not run.


That is opposite of what I said.

I said, if 4 > RC of previous steps (or previous steps RC <= 4), then don't run step040.
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
No new posts JTS parameter Shashank Chaubey JCL & VSAM 2 Thu Jul 13, 2017 4:15 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm
No new posts Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 pm
No new posts DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm


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