Series: Subject: Topic:
Question: 131 of 233

What is the difference between RETURN CODE & MAXCC CODE?

Asked by: Interview Candidate | Asked on: Jun 6th, 2006
Showing Answers 1 - 4 of 4 Answers

Answered On : Jun 9th, 2006

A RETURN_CODE shows the status of each step within a job, however a MAXCC is counted by the operating system after execution of a complete job which is the maximum of one of the step.

Login to rate this answer.

Answered On : Jul 5th, 2006

A RETURN_CODE shows the status of each step within a job, the maximum RETURN_CODE is 256, where as MAXCC is used for the final output of the programe. If the MAXCC is ZERO then job is executed successfully. In MAXCC we have 0,2, 4, 8.

Login to rate this answer.

Answered On : Jul 5th, 2006

View all answers by varanasi

A RETURN_CODE shows the status of each step within a job and the maximum RETURN_CODE is 256, where as MAXCC shows the end of the programme status, if the MAXCC is ZERO it means that job is executed successfully. We have MAXCC are like 0,2,4,8. MAXCC=8 means fatal error.

Login to rate this answer.

Answered On : Mar 24th, 2009

View all answers by oldman

Actually a step may have both return codes and MAXCC. Example 1: You have an IDCAMS step that deletes multiple VSAM files. Each delete statement will produce a return code, and the MAXCC for that step will be the highest return code received in that step. Let's say you have 6 delete statements and the first 3 are successful and return codes of 0 are returned, but the last 3 VSAM files are open and therefore cannot be successfully deleted and return codes of 8 are returned. In this scenario you have a step that returned 3 return codes of 0 and 3 return codes of 8, thus the MAXCC would be set to 8 as that was the highest return code returned in that step.Example 2: You have an IDCAMS step that does verifies for multiple VSAM files, but 1 or more are already open for either online usage or by another batch application, and you get an error like the following:    VERIFY FILE (INPUT01)                         IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0                                                      VERIFY FILE (INPUT02)                         IDC3300I  ERROR OPENING VSAM FILE NAME   IDC3351I ** VSAM OPEN RETURN CODE IS 168          IDC3003I FUNCTION TERMINATED. CONDITION CODE IS 12                                                      VERIFY FILE (INPUT03)                         IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0In this example, 2 return codes for the step are 0 and 1 return code for the step is a 12 so the MAXCC for the step would be 12.Now let's say you want your job to continue processing even if the MAXCC is 12. You can reset the MAXCC for that step by testing the MAXCC and if greater than 0 reset it to 0.Example JCL for resetting MAXCC://****************************************************//      VERIFY INPUT FILES                         //****************************************************//*//PS0020   EXEC PGM=IDCAMS,COND=(0,NE)                //*//INPUT01  DD DSN=VSAM.FILENAM1,DISP=SHR    //INPUT02  DD DSN=VSAM.FILENAM2,DISP=SHR    //INPUT03  DD DSN=VSAM.FILENAM3,DISP=SHR     //SYSIN    DD DSN=PDS.OF.CNTLMBRS(VSVRFY01),DISP=SHR //SYSPRINT DD SYSOUT*               Contents of: PDS.OF.CNTLMBRS(VSVRFY01) VERIFY FILE (INPUT01)          VERIFY FILE (INPUT02)          VERIFY FILE (INPUT03)          IF MAXCC > 0 THEN SET MAXCC = 0            

Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions



twitter fb Linkedin GPlus RSS


Interview Question

 Ask Interview Question?


Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.