About these ads

Archive for the ‘setting return code in jcl’ Tag

Setting MAXCC in JCL using IDCAMS   3 comments


Day to day programming life we will face a lot situations where we need to set MAXCC or return code of JCL whether conditionally or unconditionally. There a are lot of possible ways to do achieve this when we execute program like (set return-code in Cobol, set RC in REXX etc..). but what we will do when we need to set MAXCC using JCL?, how to achieve this??.

One possible solution is set MAXCC using IDCAMS, since IDCAMS is available all the shops there are no pre-requisites for this. .

How to setup MAXCC of JCL using IDCAMS?

You just need to code SET MAXCC=<return code> in the SYSIN dataset of IDCAMS.

What are the limits for SET MAXCC command of IDCAMS

You can use any value as return code from 0 to 16, all the values out of this range will cause a MAXCC 16  for the JCL

Sample JCL to set MAXCC

d ===>                                                  Scroll ===> CSR 
—-+—-1—-+—-2—-+—-3—-+—-4—-+—-5—-+—-6—-+—-7–
***************************** Top of Data ******************************
//R0318BMJ  JOB  (ACCNT#,&SYSUID),’SHIBU THANNIKKUNNATH’,NOTIFY=&SYSUID
//          EXEC PGM=IDCAMS                                            
//SYSPRINT  DD   SYSOUT=A                                              
//SYSIN     DD   *                                                     
   /* CHANGE THE BELOW MAXCC TO A NUMBER BETWEEN 0 AND 16*/             
   SET MAXCC=16                                                         
/*                                                                     
**************************** Bottom of Data ****************************

Screen shots

image

image

%d bloggers like this: