GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Mainframe  >  JCL
Go To First  |  Previous Question  |  Next Question 
 JCL  |  Question 67 of 128    Print  
Explain the usage of COND parameter in JCL with an example

  
Total Answers and Comments: 2 Last Update: May 21, 2007     Asked by: shilpa 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: SWATI
 
1) The COND specifies condition for execution of subsequent job step depend on the return code from previous steps.
2) COND Can be coded in both JOB and EXEC statements. But COND written in EXEC stmt overrides on COND written in JOB stmt.
3) MAximum 8 conditions can be coded in the COND parameter. In case of multiple conditions if ANY of the  condition is found TRUE then the JOB stops proceeding further.
4)It bypasses the step if the condition is true.


SYNTAX :  COND=(CODE,OPERATOR,STEPNAME)
code can be 0 to 4095
Operator can be GT, LT, GE, LE, EQ
Stepname is optional,if omitted then the reurn code of all the steps are checked.

In EXEC you may find like

   COND=ONLY it allows step execution if any prior step is ABENDED
   COND=EVEN it allows step execution even if the prior step is ABENDED

 Example.
//STEP2 EXEC PGM=PROG12,COND=(4,GT,STEP1)

Here system bypasses the  STEP2 if 4 is greater than the return code from STEP1


 

Above answer was rated as good by the following members:
nikipathak
April 19, 2007 06:23:00   #1  
SWATI        

RE: Explain the usage of COND parameter in JCL with an...
1) The COND specifies condition for execution of subsequent job step depend on the return code from previous steps.
2) COND Can be coded in both JOB and EXEC statements. But COND written in EXEC stmt overrides on COND written in JOB stmt.
3) MAximum 8 conditions can be coded in the COND parameter. In case of multiple conditions if ANY of the condition is found TRUE then the JOB stops proceeding further.
4)It bypasses the step if the condition is true.


SYNTAX : COND (CODE OPERATOR STEPNAME)
code can be 0 to 4095
Operator can be GT LT GE LE EQ
Stepname is optional if omitted then the reurn code of all the steps are checked.

In EXEC you may find like

COND ONLY it allows step execution if any prior step is ABENDED
COND EVEN it allows step execution even if the prior step is ABENDED

Example.
//STEP2 EXEC PGM PROG12 COND (4 GT STEP1)

Here system bypasses the STEP2 if 4 is greater than the return code from STEP1



 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 1Overall Rating: -N/A-    
May 21, 2007 21:39:17   #2  
kckinney Member Since: May 2007   Contribution: 48    

RE: Explain the usage of COND parameter in JCL with an...
COND is outdated. RTM and use IF THEN.
 
Is this answer useful? Yes | No

 Related Questions

Datasets can be grouped in a DD statement one after another, eg. in a JOBLIB statement where the load module can exist in one of many datasets.  
Latest Answer : For concatinating datasets through JCL, we can use MERGE Utility. Condition is that the datasets should be in sorted order. ...

What are the keywords associated with DCB? How can you specify DCB information? What is the OS precedence for obtaining that DCB information, ie. where does the system look for it first?
The keywords associated with the DCB parameter are LRECL, RECFM, BLKSIZE and DSORG. The DCB information can be supplied in the DD statement. The sysem looks for DCB information in the program code first. 

COND specifies the conditions for executing the subsequent job step. The value after the COND= is compared to the return codes of the preceding steps and if the comparison is true, the step is bypassed. 
Latest Answer : In exec statement the condition is used for by-passing the perticular step through the condition,if COND=0 Its a successfull executionif COND=4 Its a warning if COND=8 Its a serious errorif COND=16 Its a fatal error.So that we can use this condition key ...

MVS now allows for an IF bracketed by an END IF around any job step to replace the COND= syntax. Again, if the IF statement is true, the step is bypassed.  

Latest Answer : The step by pass without COND occurs when- you code IF command- a previous STEP cancel- JCL ERROR occurs ...
Read Answers (4) | Asked by : Ramkumar

What could be the disposition parameter that i would have to use in the jcl if i have a file that has to be created newly for every successful run of the program ,but at the same time it should retain the old data if my program abend in the middle and restarts. could you please provide me the code?
Read Answers (5) | Asked by : vineeth

What is the importance of ADDRSPC parameter in EXEC statement and how is it different from REGION parameter of EXEC statement?
Read Answers (4) | Asked by : chandrasekhar

Latest Answer : The value give is normally a number; usually 01-15 with 01 being the lowest and 15 being the highest. Most installations do not allow this parm to be overriden. So, don't be surprised if your job doesn't do anything. ...

Latest Answer : we can't pass through parm more than 100 char. Remember it. ...
Read Answers (5) | Asked by : roshan

Latest Answer : by using the NOTIFY Parameter in a job statement, It sends a Message to the user about the status of job . ...


 Sponsored Links

 
Related Articles

SOA Industry Usage

SOA Industry Usage First time usage of SOA tends to highlight the need for semantic interoperability While SOA provides framework for integration of cross Business operations with information flow in real time there is also a major semantic interoperability conflict that is not being addressed dir
 

Explain about TNSPING

You can also use tnsping utility on command prompt to check Oracle Net connectivity. Follow these steps to check the connection to particular SID. Open Command prompt. Write tnsping < SID for the database connectivity you want to check > If you get the message “Used TNSNAMES
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Industry Usage of VoiceXML

Wireless communications tools have a number of disadvantages, and some of these are small screens, weak processing power, and a lack of sufficient input abilities. It is these three factors that have greatly limited the scope of many wireless devices, and it is hoped that VoiceXML will remedy many
 

Mainframe Features

Mainframe Features In this Mainframe tutorial you will learn about features of Mainframe Processing power memory capacity performance computing multiple operating system time sharing reliability serviceability availability clustering technology and other features available in Mainframe mosgoogle cen
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

UML Industry Usage

UML Industry Usage Introduction UML is a very important programming language for those who work in either the software development or software engineering field UML is the program of choice for many software developers because it uses an object oriented approach and this is valuable for many contemp
 

CSS3 Links Creation and Usage

CSS3  Links Creation and Usage Links are very vital for any web page to navigate through the site and so is also with CSS3 In CSS3 it is possible to handle links even more powerful and effectively as it is possible to handle various states of links which are link visited hover and active s
 

Industry Usage of VoiceXML

Industry Usage of VoiceXML There are a number of uses for VoiceXML in the voice command industry The importance of VoiceXML comes from the fact that many people have been unhappy with the use of textual interfaces such as WAP and are looking for more powerful alternatives Wireless communications too
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape