Examples of Job-level Condition Code Checking from DB.1 Job Definition Panel in CA 7

Document ID : KB000024233
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

Can you use CA 7 to set condition code checking at the job level?

Answer:  

Yes, use Condition Code Checking (COND-CODE) and Relational Operator (RO) on DB.1 Job Definition panel to define job-level condition codes used to determine successful job execution.

 --------------------CA-7 CPU JOB DEFINITION ------------------ 
 
EXECUTION: MAINID: xxxx INSERT-RMS: x COND-CODE: nnnn RO: xx
           DONT SCHEDULE -- BEFORE: yyddd hhmm AFTER: yyddd hhmm
 ------------------------DB.1 -----------------------------------

COND-CODE is used with RO (relational operator) to define the job-level condition codes used to determine whether a job executes successfully.

You can key 1 to 4 numeric characters from 0 to 4095.

This field is not required and will default to 0 (zero).

RO specifies the relational operator of the condition code (COND-CODE) or if the step level #SCC statements are being used in the job's JCL.

This field is not required and will default to 0 (zero).

If 0 is used, no test is made on the job's condition code.

The highest condition code that a job generates is tested by both parameters.

The RO values:
 
EQ        Specifies equal to 
LT        Specifies less than 
GT        Specifies greater than  
GE        Specifies greater than or equal to  
LE        Specifies less than or equal to  
NE        Specifies not equal to 
#S        Specifies to make step condition code tests based on #SCC statements 
          in the JCL.
IG        Specifies to do no evaluation of the job. CA 7 always assumes the job 
          completes successfully, regardless of condition codes, abend codes, or
          runtime JCL errors. When this is used, the INSERT-RMS fields should
          be N.
0         Specifies to make no condition test

Note: This test is for internal use by CA 7 only. It simply tells CA 7 what action to take after the job completes. CA 7 does not determine or control which steps are to be executed.

Same logic as IBM condition code checking is used.  To determine the test that needs to be made, make a sentence:

              CC is RO to the job's CC

And if you can answer 'true' to the above, then it has completed abnormally (Test is TRUE, you're through (through meaning not good)).

In other words, if job receives CC of 4 and DB.1 panel states 0 - LT

Then the above logic would read:

               0 is LESS THAN 4

The statement is 'true', so it is a bad completion

Another example:

If COND-CODE is set at 8 and RO is set at LE, the job is marked as completing abnormally if the job's condition code is 8 or greater than 8 (job completes with cc 12)

          8 is LESS THAN or EQUAL TO 12

This statement is 'true' so it is a bad completion

Or...

If COND-CODE is set at 0 and RO is set at NE, the job is marked as completed abnormally if job's condition code is any number not equal to 0 (job completed with cc of 4)

       0 is NOT EQUAL to 4

The statement is 'true' so it has an abnormal execution.

Or...

If COND-CODE is set at 166 and RO is set at LT, The job is marked as completed normally if job's cond code is 166 or less and completed abnormally if job's cond code is greater that 166 (job completed with cc of 0166)

       166 is LESS THAN 166

This statement is 'false', so it has a normal execution.

***same set up except: (job completed with cc of 167)

        166 is LESS THAN 167

This statement is 'true', so job has an abnormal execution.

Or...

If COND-CODE is set at 8 and RO is set at 0 
no condition test will be performed.

Additional Information:

As always, please contact CA Technologies support for CA 7 if you have further questions.