Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Difference in mentioned the COND parameter in job and step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
namashlr
Currently Banned

New User


Joined: 27 Aug 2006
Posts: 5

PostPosted: Sun Oct 01, 2006 4:38 pm    Post subject: Difference in mentioned the COND parameter in job and step
Reply with quote

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
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1190
Location: Bangalore,India

PostPosted: Sun Oct 01, 2006 8:56 pm    Post subject:
Reply with quote

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
View user's profile Send private message
rocksolid

New User


Joined: 29 Aug 2006
Posts: 21
Location: India

PostPosted: Tue Oct 03, 2006 10:46 am    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts Xpediter: STEP OVER cobol section Auryn Compuware & Other Tools 0 Thu Feb 22, 2018 9:30 pm
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts DUMMY When do I need add a DCB parameter Martylin JCL & VSAM 3 Fri Dec 08, 2017 7:20 am
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us