Page 1 of 2

How to override maxcc of a JCL using REXX

PostPosted: Mon Dec 19, 2011 9:42 pm
by humiksh11
Hi,
I have a JCL with 26 steps. I am getting an RC of 08 from most of the STEPS. Which is from a Querrying tool.
My problem is that RC 08 indicates partial report recieved which is fine for me.
Now i am forced to make it <=4 due to objections from production control.
Now i want to get a Maxx-cc <=4 from Job irrespective of its RCs from various steps.
I am not using IDCAMS, so SET MAXCC doesn't work and JOBRC doesn't work as my JES2 in not an updated version.

Please help with shortest and easiest REXX / CLIST that can solve my problem.

Re: How to override maxcc of a JCL using REXX

PostPosted: Mon Dec 19, 2011 9:53 pm
by BillyBoyo
If you do not have the new z/OS and JES2, you simply can't do it.

Work with your production control to find a solution which meets the business requirement within their operational standards. This may involve splitting the job into pieces or working out how to not get the 8 from your "querying tool".

Re: How to override maxcc of a JCL using REXX

PostPosted: Mon Dec 19, 2011 10:43 pm
by humiksh11
Thank you for your response Billyboyo,

I expected REXX to be able to do anything (well almost) with JCL and system :-(
I posted it in REXX/CLIST index as well.....

Re: How to override maxcc of a JCL using REXX

PostPosted: Mon Dec 19, 2011 10:54 pm
by steve-myers
Do not post the same topic in multiple places!

Re: How to override maxcc of a JCL using REXX

PostPosted: Tue Dec 20, 2011 2:43 am
by jerryte
Use a rexx or clist to invoke your program. Then from the rexx you can set any return code you want. Below is a short skeleton
pgm = 'whatever'
parm = 'some parms'
ADDRESS ATTCHMVS pgm parms
SAY rc
exit 4

Re: How to override maxcc of a JCL using REXX

PostPosted: Tue Dec 20, 2011 2:07 pm
by NicC
Following on from Jerryte's reply - that is a heck of an overhead whn it has to be applied to 26 job steps. However, you could do all 26 steps under one invocation of Rexx but you would have to do all you file allocations/deallocations in Rexx and you would have to include restart code.

Re: How to override maxcc of a JCL using REXX

PostPosted: Tue Dec 20, 2011 10:00 pm
by humiksh11
Thank you jerryte,

The skeleton program works good when i tested for a small program.
But i can not make such a big change as replacing JCL with a REXX invoking programm in production.
So, is it possible that i code a 27th STEP with REXX to over-ride MAXCC of Job as whole or to over-write the RC of previous 26 Steps? (if possible at all). Sorry for having such a restricted requirement. But i have no other option :(

Re: How to override maxcc of a JCL using REXX

PostPosted: Tue Dec 20, 2011 10:14 pm
by NicC
You can only change the RC of the currently executing step. Once the step is finished that return code is set in stone - unless, I guess, you do some fancy assembler work running throgh various control blocks which, I also presume, is what the new JOBRC thingy does.

Re: How to override maxcc of a JCL using REXX

PostPosted: Tue Dec 20, 2011 10:35 pm
by humiksh11
Hey Nic,

Even for the currently executing STEP, I need to call a Utility that executes REXX which is not possible as it is using a DB2 utility already. As another EXEC makes it another STEP, is it still possible that i can RESET the RC of that STEP?

Re: How to override maxcc of a JCL using REXX

PostPosted: Tue Dec 20, 2011 10:38 pm
by NicC
As I said before, once a step is finished, as far as we are concerned, the RC is set and cannot be changed.