View previous topic :: View next topic
|
Author |
Message |
dkarthikreddy
New User
Joined: 14 Mar 2008 Posts: 28 Location: bangalore
|
|
|
|
Hi All
I have a requirement like this. I want to execute a step in a jcl based on the Return code of two different previous steps.
Eg:
IF PS020.RC = 0 THEN
IF PS010.RC = 100 or 200 THEN
execute a different job
ELSE
execute a different job
END-IF
END-IF
Basically the first IF will check for the Emptiness of a file using IDCAMS and the second IF wil check for the Return code a program executed in step PS010( Also i have to check with OR condition in second IF.. is it possible. )
Is this possble in a JCL ?
Please let me if you need any further information
Thanks
Karthik |
|
Back to top |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
Quote: |
IF PS020.RC = 0 THEN
IF PS010.RC = 100 or 200 THEN
execute a different job
ELSE
execute a different job
|
Do you want to excecute different job or different step in the same job? |
|
Back to top |
|
|
dkarthikreddy
New User
Joined: 14 Mar 2008 Posts: 28 Location: bangalore
|
|
|
|
Ofcourse,, want to execute a different step which wil executes a program and a subsequent step which wil load a job in jobtrac.. |
|
Back to top |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
you can use like this.
IF (PS010R.RC=0100 OR PS010R.RC=0200 OR PS010R.RC=0)
execute your step
ENDIF ......(no hyphen)
similarly you can use AND conditions. |
|
Back to top |
|
|
dkarthikreddy
New User
Joined: 14 Mar 2008 Posts: 28 Location: bangalore
|
|
|
|
Well... the above condition satisfies if either one of the two steps satisfies, but it doesnt suits to my requirement..
Guide me if the following Condition works or not.
IF (PS020.RC=0 AND (PS010.RC=100 OR PS010.RC=200)) THEN
do something
ENDIF
IF (PS020.RC=0 AND (PS010.RC=300 OR PS010.RC=400)) THEN
do something
ENDIF
Thanks |
|
Back to top |
|
|
Mathiv Anan
Active User
Joined: 23 Jul 2008 Posts: 106 Location: USA
|
|
|
|
what is the problem in it?
you can use it similar to normal if conditions in cobol.
Your above conds will work. |
|
Back to top |
|
|
dkarthikreddy
New User
Joined: 14 Mar 2008 Posts: 28 Location: bangalore
|
|
|
|
Fine.. I just need the confirmation whether i go can go ahead and use the above condition..Now i wil use it and test it..
Thanks a lot for your valuable reply
Karthik |
|
Back to top |
|
|
|