COND CODE - Can it be reset to zero (0)

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

Post Reply
lnpdavid
Member
Posts: 11
Joined: Tue Apr 28, 2009 8:48 pm
Location: Missouri USA

COND CODE - Can it be reset to zero (0)

Post by lnpdavid » Wed Mar 06, 2013 1:10 am

I have a situation where one step in the JCL checks to see if there is any data in a file (using IDCAMS) and it will set the condition code to a value of 1. Later on in the job another file is being processed and this file, and its processing, has nothing to do with the earlier condition code.

I would like for the condition code to go back to a value of zero so that the subsequent steps use the new condition code, not the earlier one.

Somewhat as a side note, the job also has a PROC which does its own condition code checking (for a zero). I'd like to override the PROC with altering what code to check. Can you override the condition code?
David Earhart

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Wed Mar 06, 2013 1:47 am

So, to your first, no, you can't reduce, reset or anything the cc of a previous step. What is the problem with the 2nd file? Don't you just test the CC for steps relating to that file, not the first one?

What does the JCL manual say about overriding COND checking?

lnpdavid
Member
Posts: 11
Joined: Tue Apr 28, 2009 8:48 pm
Location: Missouri USA

Post by lnpdavid » Wed Mar 06, 2013 1:55 am

There is no real problem with the second file. Similar to the first, there is an IDCAMS to check and see if there is any data and subsequent steps use that information to know whether or not there is anything to process.

Part of that process is the PROC. Because it has its own condition code checking (for a zero) it gets messed up with the earlier condition code.
David Earhart

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Wed Mar 06, 2013 9:24 am

Use the KISS principle - one procedure per job and do not mix non-procedure and procedure within a job. The job scheduler doesn't mind how many jobs it has to submit.
Regards
Nic

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Wed Mar 06, 2013 1:14 pm

As William has indicated, you can't change the CC of a previous step. For that matter, cc of a step belongs to that step and can't be altered in any subsequent steps, whether it's IDCAMS or anything else.
I would like for the condition code to go back to a value of zero so that the subsequent steps use the new condition code, not the earlier one.
This is confusing, are the subsequent step having the condition check only for IDCAMS step; I mean - if you don't need it - just remove the condition check from subsequent step, no?
Regards,
Anuj

lnpdavid
Member
Posts: 11
Joined: Tue Apr 28, 2009 8:48 pm
Location: Missouri USA

Post by lnpdavid » Wed Mar 06, 2013 7:54 pm

The two files are not directly related. We were just trying to save on jobs. We had thought of the two jobs and will go that route to keep it simple.

Thanks for the advice.
David Earhart

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Thu Mar 07, 2013 7:49 pm

Okay, make sense now. Thanks for the follow up and good luck! :)
Regards,
Anuj

Post Reply

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



Other References
Mainframe Tools and others