SYSTEM COMPLETION CODE=0C4

In this Mainframe Forum - You can post your queries on JCL, OS/390 JCL, MVS JCL, z/OS JCL, JES2 & JES3

Moderators: Frank Yaeger, DikDude, Moderator Group

shankar_at
Member
Posts: 8
Joined: Fri Feb 22, 2013 1:37 am

SYSTEM COMPLETION CODE=0C4

Post by shankar_at » Sat Mar 02, 2013 2:44 am

I am compiling a prog, I have got a JCL return message like below,

SYSTEM COMPLETION CODE=0C4 REASON CODE=00000011
TIME=16.34.25 SEQ=04751 CPU=0000 ASID=01D4
PSW AT TIME OF ERROR 078D2000 00DC36D0 ILC 4 INTC 11
NO ACTIVE MODULE FOUND
NAME=UNKNOWN
DATA AT PSW 00DC36CA - 12664740 815E4460 80BA9110
GR 0: 00033F88 1: 00033F88
2: 000073BC 3: 00006DE0
4: 0001F5BA 5: 0001940E
6: 00000084 7: 00000030
8: 00DC35F0 9: 008FF520
A: 00000000 B: 00000078
C: 00033F88 D: 0000702C
E: 50007196 F: 00DC35F0
END OF SYMPTOM DUMP

I tried to find solution in this forum but did not get right input.
I tried to increase Region = 0M, but again end up with same reason.
Can someone please help, is it something program issue, if it is how do I find where is the problem? is there any method to find issue using the set of numbers given above?
Thanks,
Sha

diwz
Member
Posts: 44
Joined: Sun Feb 10, 2013 10:39 am

Post by diwz » Sat Mar 02, 2013 11:23 am

First check, did you missed some of load modules of your subroutines or sub programs that supposed to be used by your main program.

Check if there is any arrays that you are using and verify if there is any loop which is executing more than the occurs times. Mostly application programs may have this type of errors. Check and let us know, Forum members can help you

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Sat Mar 02, 2013 2:35 pm

Is that all the output you have? Nothing from Language Environment? No abend-handling package (Abend-Aid for instance)?

If yes and no, then locate the address at the last part of the PSW in the dump. Go "backwards/upwards" through the dump until you see the start of a program (hopefully yours).

Subtract the address of the start of the program from the address at the last part of the PSW.

Use that as the "offset" to identify which line of your Cobol program caused the problem (from the offsets in the Compile listing, from OFFSET,NOLIST or NOOFFSET,LIST compile options).

Then you'll know a bit more.

Missing modules will not create a S0C4. Very wild subscripts might (you can use compiler option SSRANGE to check for that at run-time). Missing items between CALL ... USING ... and PROCEDURE DIVISION USING .... will. Accessing an area "under" an FD before file is open/after file is closed/end-of-file can.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Sat Mar 02, 2013 9:19 pm

Is that really an abend from a compile or execution of the program? Are you using some compile JCL or some change-management tool to compile program?
Regards,
Anuj

shankar_at
Member
Posts: 8
Joined: Fri Feb 22, 2013 1:37 am

Post by shankar_at » Sun Mar 03, 2013 12:10 am

This message is returned from Compile. I am using a tool, not JCL.

shankar_at
Member
Posts: 8
Joined: Fri Feb 22, 2013 1:37 am

Post by shankar_at » Sun Mar 03, 2013 12:27 am

William Collins wrote:Is that all the output you have? Nothing from Language Environment? No abend-handling package (Abend-Aid for instance)?

If yes and no, then locate the address at the last part of the PSW in the dump. Go "backwards/upwards" through the dump until you see the start of a program (hopefully yours).

Subtract the address of the start of the program from the address at the last part of the PSW.

Use that as the "offset" to identify which line of your Cobol program caused the problem (from the offsets in the Compile listing, from OFFSET,NOLIST or NOOFFSET,LIST compile options).

Then you'll know a bit more.

Missing modules will not create a S0C4. Very wild subscripts might (you can use compiler option SSRANGE to check for that at run-time). Missing items between CALL ... USING ... and PROCEDURE DIVISION USING .... will. Accessing an area "under" an FD before file is open/after file is closed/end-of-file can.
I tried some of the options and also removed lot of my other functionality logic and now trying to compile with very min code, still something is wrong. Below is my simple code. I know there is a minor thing is causing problem. but not able to locate it.
PROCEDURE DIVISION.

0000-MAINLINE.

PERFORM 0200-INITIALIZE-OPEN-FILES THRU
0200-EXIT.

PERFORM 0100-MAIN-PROCESSING THRU
0100-EXIT.


0000-RETURN.
STOP RUN.
*************************************
*** OPEN,INITIALIZE AND READ FILE ***
*************************************
0200-INITIALIZE-OPEN-FILES.
* OPEN FILES.
OPEN INPUT INPUT-FILE.
IF IN-IO-OK
NEXT SENTENCE
ELSE
MOVE LIT-OPEN TO WS-IO-OP
MOVE LIT-CLRIN TO WS-IO-DD
MOVE WS-IN-FILE-STATUS TO WS-IO-STATUS
PERFORM 9999-ABEND-THE-PROGRAM
THRU 9999-EXIT.

OPEN OUTPUT OUTPUT-FILE.
IF OUT-IO-OK
NEXT SENTENCE
ELSE
MOVE LIT-OPEN TO WS-IO-OP
MOVE LIT-CLROUT TO WS-IO-DD
MOVE WS-OUT-FILE-STATUS TO WS-IO-STATUS
PERFORM 9999-ABEND-THE-PROGRAM
THRU 9999-EXIT.

* READ 1ST INPUT RECORD.
PERFORM 0105-READ-IN-FILE THRU
0105-EXIT.
0200-EXIT.
EXIT.

*************************************************
*** ***
*** 0100- MAIN PROCESSING ***
*** ***
*************************************************
0100-MAIN-PROCESSING.


PERFORM 0102-WRITE-READ-RECORD.

0100-EXIT.
EXIT.
*************************************
*** ***
*** WRITE RECORD AND READ NEXT ***
*** INPUT RECORD ***
*** ***
*************************************

0102-WRITE-READ-RECORD.

***** WRITE OUTPUT RECORD:
PERFORM 0150-WRITE-DETAIL-REC THRU
0150-EXIT UNTIL WS-EOF-SWITCH = 'Y'.

***** CLOSE FILES
CLOSE INPUT-FILE
OUTPUT-FILE.

0102-EXIT.
EXIT.

*************************************
*** ***
*** READ INPUT FILE ***
*** ***
*************************************

0105-READ-IN-FILE.
*
READ INPUT-FILE
AT END MOVE 'Y' TO WS-EOF-SWITCH
END-READ.

IF IN-IO-OK
NEXT SENTENCE
ELSE
DISPLAY ' ((((BAD INPUT READ)))) '
MOVE LIT-READ TO WS-IO-OP
MOVE LIT-CLRIN TO WS-IO-DD
MOVE WS-IN-FILE-STATUS TO WS-IO-STATUS
PERFORM 9999-ABEND-THE-PROGRAM
THRU 9999-EXIT.

0105-EXIT.
EXIT.
*************************************
*************************************
*** ***
*** WRITE TO DETAIL RECORD ***
*** ***
*************************************

0150-WRITE-DETAIL-REC.
* MOVE THE PROCESSING FIELDS AND WRITE THE RECORDS.


MOVE IN-REC TO WS-HOLD-OUT-DATA

PERFORM 0155-WRITE-REC THRU 0155-EXIT.
PERFORM 0105-READ-IN-FILE THRU 0105-EXIT.


0150-EXIT.
EXIT.
0155-WRITE-REC.

WRITE OUT-REC FROM WS-HOLD-OUT-DATA.

0155-EXIT.
EXIT.

*************************************
9999-ABEND-THE-PROGRAM.

DISPLAY WS-IO-ERROR-MESSAGE.
DISPLAY '///////////////////////////'.
DISPLAY '///////////////////////////'.
DISPLAY ' '.
DISPLAY ' XXXXXX IS ABENDING '.
DISPLAY ' '.
DISPLAY '///////////////////////////'.
DISPLAY '///////////////////////////'.

9999-EXIT.
EXIT.

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Sun Mar 03, 2013 4:35 am

Well, you PERFORM 999-ABEND-THE-PROGRAM but there is no code to actually cause an abend. I suspect if you look at the SYSOUT from the step, you'll find IO error messages. I'd guess you file is not open, but you continue to READ and then continue to use the record, which you won't have, and that should get you a S0C4.

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Sun Mar 03, 2013 6:27 am

First you say you have a message issued by JCL and later you say that you are not using JCL but a tool. Which is it? Also that message is issued because the os has found an error while a program is executing and it is unlikely to be the compiler failing. So, possibly you are running a "compile,link and go" and it is the go step that is failing?
Regards
Nic

shankar_at
Member
Posts: 8
Joined: Fri Feb 22, 2013 1:37 am

Post by shankar_at » Sun Mar 03, 2013 6:53 am

NicC wrote:First you say you have a message issued by JCL and later you say that you are not using JCL but a tool. Which is it? Also that message is issued because the os has found an error while a program is executing and it is unlikely to be the compiler failing. So, possibly you are running a "compile,link and go" and it is the go step that is failing?
Nic,
I mean to say that, Its tool that, we use for compiling a program which itself create JCL internally and compile. I did not write JCL explicitly to compile this.
Other part, its only compiling, not link and go. (sorry for not being specific)..

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Sun Mar 03, 2013 4:43 pm

Well, if it is an internal thing to your organisation no one outside of your organisation can help as someone in your organisation is going to have to fix the problem.
Regards
Nic

shankar_at
Member
Posts: 8
Joined: Fri Feb 22, 2013 1:37 am

Post by shankar_at » Sun Mar 03, 2013 6:23 pm

NicC wrote:Well, if it is an internal thing to your organisation no one outside of your organisation can help as someone in your organisation is going to have to fix the problem.
Sure. Thank you all for your help......

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Sun Mar 03, 2013 8:21 pm

?

Did you read my post, at least?

There's a whole Cobol program there, the "compile" was just a red-herring through loose use of nomenclature.

shankar_at
Member
Posts: 8
Joined: Fri Feb 22, 2013 1:37 am

Post by shankar_at » Sun Mar 03, 2013 10:32 pm

William Collins wrote:?

Did you read my post, at least?

There's a whole Cobol program there, the "compile" was just a red-herring through loose use of nomenclature.
Bill,
Off course I did, I have recoded in different way.
Not sure what was the real program, but its working fine.
I got to know some new things from your reply.
Thanks..

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Mon Mar 04, 2013 5:33 am

Hmm- I do not see a post from Bill here although there are posts from William who is not Bill because if he was Bill I m sure he would have Bill as either his user name or signature.
Regards
Nic

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Tue Mar 05, 2013 5:19 pm

LOL. I've seen them using Bob-for-Robert, Bill-for-William and ... I'm not sure where did the culture came from!
Regards,
Anuj

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others