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

Parameter COND


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1448
Location: Chicago, IL

PostPosted: Wed Dec 14, 2005 9:11 pm
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: 411
Location: Colarado, US

PostPosted: Wed Dec 14, 2005 9:17 pm
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
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: 1448
Location: Chicago, IL

PostPosted: Wed Dec 14, 2005 10:20 pm
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
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

Global Moderator


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

PostPosted: Thu Dec 15, 2005 1:02 am
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
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: 1448
Location: Chicago, IL

PostPosted: Thu Dec 15, 2005 3:22 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Demand with DEADLINE TIME parameter CA Products 4
No new posts Option DYNALLOC second parameter. DFSORT/ICETOOL 11
No new posts Writing the output file name from a p... JCL & VSAM 7
Search our Forums:

Back to Top