This is a two part question. The first one deals with a different way of coding a COND= parameter. The second deals with how the system treats the condition code itself.
First Part:
I am working on a job that has > 60 steps. One of the early steps sets a condition code of 1, 2, 3, ?, 10 in order to allow subsequent steps to either execute, or not, depending upon that code. Most of the steps create reports. Therefore, most of those steps will not be executed, only those looking for a specific return code set by that early step. As you can guess, those steps have a COND= parameter that looks like the following:
COND=((4,LE),(1,EQ),(2,EQ)) - This step will execute with the code is equal to a 3, correct? This looks kind of odd to me to code it this way, but I inherited the job, I didn?t create it. Anyhow, I would have coded it COND=(3,NE). Would this give the same result?
Second Part:
The more complex coding that I am MOST concerned about is coded:
COND=((0,NE,STEP55.SORT),(6,LE),(1,EQ),(2,EQ),(3,EQ),(4,EQ)) - If it wasn?t for the first test, I would say that this step gets executed if the code is a 5, correct? The additional test at the beginning is what confuses me the most. By itself I would say that the current step gets executed if STEP55 (a SORT step) executed successfully, giving a 0 return code. I would say that the interpretation of this COND parameter was two-fold. First, STEP55 returned 0, and the early step set a return code of 5. Is this correct? If I am correct, the confusing part is why the return codes don?t get mixed up with each other. (Conceivably, every step could then have a code that could be tested.) It?s almost like there is a general return code (e.g. the early step that turned on ?5? in this example), and a step specific code (i.e. STEP55 of ?0?). What if an intermediate step returned a code of 8 (and did not cancel)? Would the general test be able to test for a 5 without referring that test back to a specific step? I would guess that I'd have to add the step informaiton.
COND= Complex Conditions with Program Setting the Condition
Moderators: Frank Yaeger, DikDude, Moderator Group
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page