Professional Documents
Culture Documents
? ~ MAINFRAMES TUTORIAL, JCL TUTORIAL, VSAM TUTORIAL, COBOL TUTORIAL, DB2 TUTORIAL, CICS
Bulletin Board
Whats new at MAINFRAMES 360
(Updates)...
Mainframes360 Search
Search
powered by
Quick Links
COND Statement How does it work? ~ MAINFRAMES TUTORIAL, JCL TUTORIAL, VSAM TUTORIAL, COBOL TUTORIAL, DB2 TUTORIAL, CICS
Jump to :
<== Previous Tutorial
-------
EXEC
PGM=IEFBR14,COND=((16,GE),(90,LE,STEP1),ONLY)
the above example, the system executes this step if all of the three conditions are met,
Return codes of Any of the previous job-steps is 17 or greater.
Return code of STEP1 is 89 or less.
Any of the previous step abnormally terminates.
Example 3
Consider the series of statements :
//STEP01 EXEC PGM=IEFBR14
//STEP02 EXEC PGM=IEFBR14,COND=(0,EQ,STEP01)
//STEP03 EXEC PGM=IEFBR14,COND=((8,LT,STEP01),(8,GT,STEP02))
In the above scenario, assume the system successfully executes STEP01 with Return Code=0. The system
finds that 0 is equal to return code of STEP01 i.e. 0. So, STEP02 is bypassed. When the system
evaluates condition on STEP03, it finds that 8 is greater than return code of STEP01(we dont consider
the other part of the condition, since STEP02 was bypassed). Since, 8 > 0, the system executes STEP03.
Rule : Bypassing a job-step because of a return code test, is not the same as abnormally terminating
the job-step.
COND Statement How does it work? ~ MAINFRAMES TUTORIAL, JCL TUTORIAL, VSAM TUTORIAL, COBOL TUTORIAL, DB2 TUTORIAL, CICS
You can now try and predict in this JCL, which job-steps the system executes, and which job-steps are
bypassed...
Answer :
System executes STEP01. Return Code = 0.
(4,LT,0) false. System executes STEP02. Return Code = 0.
(16,GE,return code of any preceding step) true. System bypasses STEP03.
Technorati Tags: COND,Condition,COND on EXEC,COND on JOB,EQ,NE,GE,GT,LE,LT,job-step,COND Parameter,How
COND parameter works,IEFBR14
Posted by Quasar at Wednesday, April 01, 2009
Reactions:
0 comments:
Post a Comment
COND Statement How does it work? ~ MAINFRAMES TUTORIAL, JCL TUTORIAL, VSAM TUTORIAL, COBOL TUTORIAL, DB2 TUTORIAL, CICS
Quick Links
Jump to :
<== Previous Tutorial
-------
Note :
Copyright Quasar Chunawalla, Tata Consultancy Services,2009.
Note : The copyrights of all the material, text and pictures posted in this website
belong to the author. Any instance of lifting the material from this website, shall
be considered as an act of plagiarism. For any clarifications, please mail at quasar.
chunawala@tcs.com
COND Statement How does it work? ~ MAINFRAMES TUTORIAL, JCL TUTORIAL, VSAM TUTORIAL, COBOL TUTORIAL, DB2 TUTORIAL, CICS
Globe-trotting
Some Excerpts from Mainframes360
Q. What are the two broad types of Applications/Systems?
All application/systems are of 2 types
(i) Online Systems(Transaction Processing Systems)
(ii)Batch Processing Systems. Read more ...
Q. What is the DATA DIVSION? What are the different sections in the DATA DIVISION?
DATA DIVISION is used to describe the Input Output Storage areas and temporary storage areas. In other words, itll describe the
structure of the data being stored in Input Output Files, as well as in any temporary storage. Read more ...
Q. What is JOB Log? Why do we need a JOB Log? What purpose does it serve?
When you submit a Batch JOB/JCL to the MVS System, the MVS executes the Job Stream, makes the necessary resources available to the
the EXEC PGM (Program), and finally tells you the result of the Job. Read more ...
Q. In the previous tutorial, youve stated what is compiling, linking and running.. Can you show me a Compiler and
http://www.mainframes360.com/2009/04/cond-statement-how-does-it-work.html (5 of 9)12/23/2009 4:07:19 AM
COND Statement How does it work? ~ MAINFRAMES TUTORIAL, JCL TUTORIAL, VSAM TUTORIAL, COBOL TUTORIAL, DB2 TUTORIAL, CICS
Q. What is the ENVIRONMENT DIVISION? What purpose does it serve in the COBOL Program?
The ENVIRONMENT DIVISION provides information about the computer equipment/configuration upon which the COBOL program will run. It
also gives the name of the input and output files used in the program. It assigns the file-names to ddnames(DD Statements in the
Run JCL). Read more ...
Q. What does a Mainframe Computer look like? How do you operate it?
Lets just try to see whats life like, if you are Mainframe machines operator. A Desktop computer can fit into a trolley or a
cabinet. A Mainframe Machine is generally big monster-size, would fill up a room. On a Desktop PC, you would sit near the physical
computer and operate it using the keyboard and the mouse, and see the result on the monitor. Read more ...
Q. Hey, Windows is the most popular Operating System on a Desktop-PC. On the same lines, the popular Mainframes
Operating System is MVS...
Bulls-eye! In fact, MVS is said to be the Operating System that makes the world move. Read more ...
COND Statement How does it work? ~ MAINFRAMES TUTORIAL, JCL TUTORIAL, VSAM TUTORIAL, COBOL TUTORIAL, DB2 TUTORIAL, CICS
Q. Look, on Windows PC, you interact with the computer using the Windows GUI the Desktop Icons, the Menus,
Buttons etc. How do you interact with an MVS Mainframe System?
MVS offers several ways to interact with it. The 3 main ways of interacting with MVS are TSO, ISPF and CICS. Read more ...
Q. What does COBOL stand for? What are the application areas where COBOL Programs written?
COBOL stands for Common Business Oriented Language. COBOL Programs are used for commercial data processing. COBOL is an Englishlike language. Writing a COBOL program is just like writing a passage in English. Read more ...
Q. You said COBOL Programming language bears resemblance with English. Do COBOL Programs have paragraphs like in
English?
A COBOL Program consists of 4 main divisions : IDENTIFICATION DIVISION, ENVIRONMENT DIVISION, DATA DIVISION and PROCEDURE DIVISION.
IDENTIFICATION DIVISION is used to identify the COBOL Program to the system. It tells the... Read more ...
Q. Paragraphs in the English language are indented. Do you have indentation/alignment rules in COBOL?
Just like paragraphs in English, COBOL Divisions and Paragraphs must follow strict alignment rules. The way we indent paragraphs in
English, you must indent different Divisions, sections and paragraphs in a COBOL Program. When you write .. Read more ...
Q. What does the PROCEDURE DIVISION look like? Whats the format/syntax. Can you elaborate..
The PROCEDURE DIVISION indicates the entry-point or starting point of the COBOL Program. This is where the computer system begins
to run(execute the COBOL instructions). Hence, all your instructions/programming logic must be written inside this PROCEDURE
DIVISION. Read more ...
Q. How do you compile a COBOL Program? What is meant by Linking a COBOL Program? Finally, how do you run the
Program on a Mainframe System?
Compiling a COBOL Program : COBOL is a high-level language. The Mainframe Computer System only understands binary Machine Language
0 and 1. Thus, your COBOL Program has to be translated from COBOL Language to Binary Machine Language. So, you give the Program in
http://www.mainframes360.com/2009/04/cond-statement-how-does-it-work.html (7 of 9)12/23/2009 4:07:19 AM
COND Statement How does it work? ~ MAINFRAMES TUTORIAL, JCL TUTORIAL, VSAM TUTORIAL, COBOL TUTORIAL, DB2 TUTORIAL, CICS
COBOL Language as Input to the Translator(Compiler), and you get the Output Program in Binary Machine Language. Read more ...
Q. Could you throw some light on the WORKING-STORAGE SECTION of a COBOL Program?
The WORKING-STORAGE SECTION is used to declare any fields or records that are not going to be used in input files, or output files,
but they are used to store the intermediate results of processing in a temporary storage area. Read more ...
Navigation
Navigation
- Main Page
- Questions Archive
- Articles and Writing
Tutorials
+ JCL Tutorials(12)
- Introduction to IBM Mainframes
- Basics of JCL
- How to read/write data from
Datasets
- JOB Statement Fundamentals
- EXEC Statement I
- EXEC Statement II
- DD Statement Part I
- DD Statement Part II
- DD Statement Part III
- More on COND Statement
- More on Cataloged and
Instream procedures
- More on JES2 Job Log
+
+
+
-
FAQs
COND Statement How does it work? ~ MAINFRAMES TUTORIAL, JCL TUTORIAL, VSAM TUTORIAL, COBOL TUTORIAL, DB2 TUTORIAL, CICS
Technorati
Add this blog to your favourites..
Subscribe To
Posts
Comments
About Me
Quasar Chunawalla
Chennai, Tamil Nadu, India