|
View previous topic :: View next topic
|
| Author |
Message |
namashlr Currently Banned New User
Joined: 27 Aug 2006 Posts: 5
|
|
|
|
What is the condition checking flow, and difference in mentioned the cond in job and step.
(pls dont give the answer job will override step) |
|
| Back to top |
|
 |
guptae
Moderator

Joined: 14 Oct 2005 Posts: 1209 Location: Bangalore,India
|
|
|
|
Hi Namshr,
COND - Each step sends an a return code to the system upon completion.
This is called condition code. COND parameter is used to control
the execution of subsequent job steps, depending on the condition
code that is returned for prior step.
Return code number between 0 and 4095
Syntax -> COND=(comparsion-code,condition)
(If coded on job)
COND=(comparsion-code,condition [,stepname] [,EVEN / ONLY])
(If coded on step)
condition can be GT,GE,LT,LE,EQ,NE
Example JCL -> COND coded on JOB
//MYJOB JOB (R475),'KRISHNA REDDY'
// COND=(4,GT)
//STEP1 EXEC PGM=COBPROG
//STEP2 EXEC PGM=COBPROG2
In this example we are specifing that if the number
4 is grater than the return code of STEP1, then STEP2
is to be bypassed. It is elaborated further in the
following image
COND coded on EXEC statement
//MYJOB JOB (U769),'KRISHNA REDDY'
//STEP1 EXEC PGM=PROG1
//STEP2 EXEC PGM=COBPROG,
// COND=(8,EQ,STEP1)
//
In this example the COND parameter is used to specify that
STEP2 should be by passed if 8 is equal to the return code
issued by STEP1. |
|
| Back to top |
|
 |
rocksolid
New User

Joined: 29 Aug 2006 Posts: 21 Location: India
|
|
|
|
In addition to Ekta,
COND parameter coded in JOB statement overrides the one in EXEC statement.
Ex:
//MYJOB JOB (U769),'KRISHNA REDDY'
// COND=(4,GT)
//STEP1 EXEC PGM=PROG1
//STEP2 EXEC PGM=COBPROG,
// COND=(8,EQ,STEP1)
//STEP3 EXEC PGM=PROG2,
// COND=(4,LE,STEP2)
//
If 4 is > the return code of step1, then STEP2 and STEP3 won't be executed. Else COND parameter in EXEC will be checked.
Thank U, |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|