View previous topic :: View next topic
|
Author |
Message |
angelalpe Warnings : 1 New User
Joined: 22 Sep 2005 Posts: 32
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
iknow
Active User
Joined: 22 Aug 2005 Posts: 411 Location: Colarado, US
|
|
|
|
Hi priyesh,
Thanks for your valuable information on COND parameter. |
|
Back to top |
|
|
angelalpe Warnings : 1 New User
Joined: 22 Sep 2005 Posts: 32
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
angelalpe Warnings : 1 New User
Joined: 22 Sep 2005 Posts: 32
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
angelalpe Warnings : 1 New User
Joined: 22 Sep 2005 Posts: 32
|
|
|
|
Hi Superk,
it does not work either what your you say to me
Thank you |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
|