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
 

 

Parameter COND

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

New User


Joined: 22 Sep 2005
Posts: 32

PostPosted: Wed Dec 14, 2005 8:52 pm    Post subject: Parameter COND
Reply with quote

I have a JCL with 6 steps. I want that the last step is executed when some of the 2 following situations takes place:

1. - Some of the previous steps has not finished with return code zero.

2. - Some of the previous steps has not been able to execute, that is to say, that the return code is FLUSH

I do not know like doing it


Thanks and greetings.
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Wed Dec 14, 2005 9:11 pm    Post subject: Re: Parameter COND
Reply with quote

Quote:
I have a JCL with 6 steps. I want that the last step is executed when some of the 2 following situations takes place
1. - Some of the previous steps has not finished with return code zero.


Code an IF condition before last step to check RC from previous steps...
Code:
//JOB....
//STEP1
//STEP2
//
.
.
.
//LASTIF IF (RC > 0) THEN
//LASTSTEP
//ENDLAST ENDIF


Quote:
2. - Some of the previous steps has not been able to execute, that is to say, that the return code is FLUSH

To check whether a perticular step has been flushed need to give an IF stmt like below...A valid RC is always >=0.

Code:
//IFOTHER  IF NOT(SMMM.RC >=0) THEN 
//LASTSTEP
//OTHERIF ENDIF


Regards,

Priyesh.
Back to top
View user's profile Send private message
iknow

Active User


Joined: 22 Aug 2005
Posts: 413
Location: Colarado, US

PostPosted: Wed Dec 14, 2005 9:17 pm    Post subject: Re: Parameter COND
Reply with quote

Hi priyesh,

Thanks for your valuable information on COND parameter.
Back to top
View user's profile Send private message
angelalpe
Warnings : 1

New User


Joined: 22 Sep 2005
Posts: 32

PostPosted: Wed Dec 14, 2005 10:03 pm    Post subject: Re: Parameter COND
Reply with quote

I have executed this case but i don?t work, the last step is not executed:

Quote:
2. - Some of the previous steps has not been able to execute, that is to say, that the return code is FLUSH

To check whether a perticular step has been flushed need to give an IF stmt like below...A valid RC is always >=0.

Code:
//IFOTHER IF NOT(SMMM.RC >=0) THEN
//LASTSTEP
//OTHERIF ENDIF
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Wed Dec 14, 2005 10:20 pm    Post subject: Re: Parameter COND
Reply with quote

I think you are saying that the solution not working for second case.

Well, Its working fine for me. Let me explain....as a valid RC from any step is always >=0.

To check for FLUSH, we'll check step.rc NOT >=0. Thats what I m doing for last step.

If SMMM has been flushed in the series, & you want to execute last step if SMMM has been flushed.... the solution given works perfact....

Regards,

Priyesh.
Back to top
View user's profile Send private message
angelalpe
Warnings : 1

New User


Joined: 22 Sep 2005
Posts: 32

PostPosted: Wed Dec 14, 2005 11:47 pm    Post subject: Re: Parameter COND
Reply with quote

Hi Priyesh,

Sorry but to my it does not work to me. I suppose that I will be making bad, but I do not know it.

You can send to me, please, the JCL that you are executing

Thank you.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Dec 15, 2005 1:02 am    Post subject: Re: Parameter COND
Reply with quote

Is this what you are looking for?
Code:

// IF (RC NE 0 | ABEND) THEN                 
//STEP6    EXEC PGM=XXXX
//SYSPRINT DD   SYSOUT=*       
// ENDIF                                     
Back to top
View user's profile Send private message
angelalpe
Warnings : 1

New User


Joined: 22 Sep 2005
Posts: 32

PostPosted: Thu Dec 15, 2005 2:27 pm    Post subject: Re: Parameter COND
Reply with quote

Hi Superk,

it does not work either what your you say to me


Thank you
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Thu Dec 15, 2005 3:22 pm    Post subject: Re: Parameter COND
Reply with quote

Hi angelalpe,

Quote:
2. - Some of the previous steps has not been able to execute, that is to say, that the return code is FLUSH

Does that mean, before executing to last step you want to check whether any previous step has been flushed or not... If FLUSHED ..run the last step...

If this is what you mean to say... what is the step name you want to check for FLUSH.

or plz make more clear ..if it is not what did you mean...

Regards,

Priyesh.
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 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
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm


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