Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 1187
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
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 pm
No new posts Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm
No new posts DDNAME parameter mistah kurtz JCL & VSAM 6 Mon Dec 19, 2016 4:41 pm
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us