antonrino.b
New User
Joined: 10 Jan 2006 Posts: 76 Location: Germany
|
|
|
|
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 1: COND coded on JOB
//JOBNAME JOB (XXXX),'anton rino'
// COND=(4,GT)
//STEP1 EXEC PGM=PROG1
//STEP2 EXEC PGM=PROG2
In this example we are specifing that if the number
4 is greater than the return code of STEP1, then STEP2
is to be bypassed.
Example 2: COND coded on EXEC statement
//JOBNAME JOB (XXXX),'ANTON RINO'
//STEP1 EXEC PGM=PROG1
//STEP2 EXEC PGM=PROG2,
// 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. |
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Remya,
Why don't you click "manuals" at the top left side of this screen? Scroll down to the JCL Manuals, look in the index under "COND" or "condition codes" and read.
Let us know if you're having problems navigating, or any others, for that matter. |
|