IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Override Condition code


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
richards12388

New User


Joined: 16 May 2015
Posts: 1
Location: USA

PostPosted: Sat May 16, 2015 9:47 am
Reply with quote

//STEP1 EXEC PGM=IEBCOMPR
//SYSUT1 DD DSN=FILE1,DISP=SHR
//SYSUT2 DD DSN=FILE2,DISP=SHR
//SYSUT3 DD SYSOUT=*
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*

This above compare step returns MAXCC 8 when there is a mismatch between the files. I need to change the MAXCC of the job to something less than 8. I tried IDCAMS in the next step to change the MAXCC or LASTCC to 1, still the job gives a MAXCC 8.

I even tried changing MAXCC in the SYSIN of IEBCOMPR, did not work.

I need the MAXCC of the job to be '1'. Any assistance on this would help. Thanks.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sat May 16, 2015 4:38 pm
Reply with quote

It sounds like you need to code a JOBRC parameter in your JOB statement as decribed in the JCL Reference Manual.

JOBRC parameter
Purpose
Use the JOBRC parameter to control how the job completion code (presented by
JES2) is set.

Syntax
Code:
JOBRC= {MAXRC}
{LASTRC}
{(STEP,stepname[.procstepname]}

Subparameter definition
MAXRC
The job completion code is set to the highest return code of any step in the job,
or if the completion of the job fails because of an ABEND, the job completion
code is set to the last ABEND code. This is the default.
LASTRC
The job completion code is set to the return code or ABEND code of the last
step that is executed in the job.
(STEP,stepname[.procstepname])
The job completion code is set to the return code or ABEND code of the step
that is indicated by the stepname.[.procstepname] parameter. If there are
duplicate stepnames, than the last matching step is used. If this step does not
exist, a JCL error is generated. If this step does not execute, the processing is
the same as if MAXRC is specified. .
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Sun May 17, 2015 9:32 am
Reply with quote

You may also need to add another step to your Job. This may be a dummy step (using IEFBR14) for which the return code is 0. And then in JOBRC, you need to point to this step and the Job will give a return code of 0.

.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Sun May 17, 2015 5:22 pm
Reply with quote

Note that:

  1. The JOBRC parameter was introduced in z/OS 1.13. If your shop is running an older version of z/OS, it will not be available.
  2. As the JOBRC parameter is dangerous when used by the lazy and/or incompetent, the sysprogs at your shop may have chosen to disallow its use (the sysprogs at my last client did).
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts Monitoring production job progress. N... JCL & VSAM 4
Search our Forums:

Back to Top