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

Got System Completion Code=0C1


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
apandey

New User


Joined: 31 Aug 2009
Posts: 73
Location: Mumbai

PostPosted: Fri Jul 29, 2011 6:41 pm
Reply with quote

Hi All,
I ran a production code for a testing but havent changed anything in code, but i m getting a System Completion Code=0C1(S0C1) abend for below statement.
---------------------------------------------------------------------------
-3 000870*==========================================================
-2 000880 1000-INITIALIZE.
-1 000890*==========================================================
000431 000900*****EXEC SQL
000432 000910***** SET :WS-PREV-COLLID = CURRENT PACKAGESET
000433 *****END-EXEC
000434 MOVE 'CURRENT PACKAGESET'
000435 TO SQL-TEMP
000436 PERFORM SQL-INITIAL UNTIL SQL-INIT-DONE
000437 CALL 'DSNHLI' USING SQL-PLIST2
+1 000940 MOVE 'PIC' TO WS-CURR-COLLID
+2 000960*****EXEC SQL
+3 000970***** SET CURRENT PACKAGESET = :WS-CURR-COLLID
+4 *****END-EXEC
+5 PERFORM SQL-INITIAL UNTIL SQL-INIT-DONE
-----------------------------------------------------------------------------------------

I m getting this abend at above line no 437, marked in bold.
Can any pls let me know how to solve this abend.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jul 29, 2011 6:53 pm
Reply with quote

make sure that the linkage editor resolves/has resolved the reference to dsnhli!
the best source of help in this case is Your support,
if You have used he standard <build> procedure the need to involve them is more than strong
Back to top
View user's profile Send private message
apandey

New User


Joined: 31 Aug 2009
Posts: 73
Location: Mumbai

PostPosted: Mon Aug 01, 2011 2:41 pm
Reply with quote

Hi Enrico,
thanks for suggestion, now that abend is resolved coz i havent given below library " DSN=TSYS.DSNLOAD,DISP=SHR " in STEPLIB.

but now i m getting S0C4 abend in my next step at below line
WRITE OUT-RPT-REC FROM DISP-BLANK-LINE
Now this output file is opened, written and closed properly.
here is few info.
Line #
------
-5 005130 END-IF.
-4 005160 MOVE CUR-IN-LOC-CODE TO PRV-IN-LOC-CODE.
-3 005170 PERFORM 2000-READ-FILE-PARA THRU 2000-EXIT.
-2 005200 3000-EXIT.
-1 005210 EXIT.
000524 005230 0000-DISP-BLANK-LINE.
000525 005240 WRITE OUT-RPT-REC FROM DISP-BLANK-LINE.
+1 005260 0000-DISP-EXIT.
+2 005270 EXIT.
+3 005290 3100-PRINT-HEADER.
+4 005310 ACCEPT HOLD-CURRENT-DATE FROM DATE.
+5 005330 MOVE HOLD-DD TO TEMP-DD.

Source
Line #
------
000088 000880 01 OUT-RPT-REC PIC X(133).
000217 002160 01 DISP-BLANK-LINE PIC X(133) VALUE SPACES.
Back to top
View user's profile Send private message
apandey

New User


Joined: 31 Aug 2009
Posts: 73
Location: Mumbai

PostPosted: Mon Aug 01, 2011 2:42 pm
Reply with quote

again this is production code where i have just compiled and submitted.
Havent changed anything to code.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Aug 01, 2011 2:54 pm
Reply with quote

Any mesages? Do you have a DD statement for the output in your JCL?

From what you have posted, the program looks to be badly structured (I'm assuming you are not the original author).

It is performing 2000 from within 3000, and 0000 follows 3000 and preceeds 3010.

However, if it is from production, initially it is probably the JCL.
Back to top
View user's profile Send private message
apandey

New User


Joined: 31 Aug 2009
Posts: 73
Location: Mumbai

PostPosted: Mon Aug 01, 2011 3:02 pm
Reply with quote

Hi Bill,
Yes i m not the original author of this code..!!
Below is sysout:

STATUS CODE FOR LOC/TID FILE 00 -> Status code of input file
STATUS CODE FOR O/P REPORT 00 -> Status code of output file
CEE3204S The system detected a protection exception (System Completion Code=0C4 From compile unit BPIC210A at entry point BPIC210A at statement 525 at entry offset +00001404 at address 1E101764.

Here is the JCL:
000209 //*******************************************************
000210 //STEP08 EXEC PGM=BPIC210A
000211 //STEPLIB DD DSN=APPL.ODDC.PROD.LOADLIB,DISP=SHR
000212 //*
000213 //SYSIN DD DSN=APPL.ODDC.PROD.PARMLIB(CPIC210C),
000214 // DISP=SHR
000215 //*
000216 //SORSIN1 DD DSN=TPROD.BPIC210Z.C19.REPORT.INFILE.PRD,
000217 // DISP=SHR
000218 //SORSRPT1 DD DSN=TPROD.BPIC210Z.C19.REPORT.OUTFILE.PRD,
000219 // DISP=(NEW,CATLG,DELETE),
000220 // UNIT=DISK,SPACE=(136,(15,6),RLSE),
000221 // DCB=(LRECL=133,BLKSIZE=23408,RECFM=FBA)
000222 //*
000223 //SYSABOUT DD SYSOUT=*
000224 //SYSOUT DD SYSOUT=*
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Aug 01, 2011 3:17 pm
Reply with quote

No messages from log or JCL?

Double-check SORSRPT1 is correct (without messages, it should be, but check).

What are you trying to do with this? It is possible that you now have some combination of input/database which has uncovered something which makes the program not work, like trying to print the blank line after the file is closed.
Back to top
View user's profile Send private message
apandey

New User


Joined: 31 Aug 2009
Posts: 73
Location: Mumbai

PostPosted: Mon Aug 01, 2011 3:26 pm
Reply with quote

I made just 1 change in JCL and program executed.

In the JCL,
000219 // DISP=(NEW,CATLG,DELETE),
000220 // UNIT=DISK,SPACE=(136,(15,6),RLSE),
000221 // DCB=(LRECL=133,BLKSIZE=23408,RECFM=FBA)

I have changed
000219 // DISP=(NEW,CATLG,DELETE),
000220 // UNIT=DISK,SPACE=(CYL,(15,6),RLSE),
000221 // DCB=(LRECL=133,BLKSIZE=23408,RECFM=FBA)
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Aug 01, 2011 3:57 pm
Reply with quote

Good for you.

What is the DD in production?

Were there any messages?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 01, 2011 4:09 pm
Reply with quote

USE the CODE tags...............
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Aug 01, 2011 4:35 pm
Reply with quote

S0C4 is protection exception, you get S0C4 from a user-written program and that makes things tough for a member of some Forum. The manauals says: (reason code=10)
Quote:
This error is caused by one of the following:

A program that was running disabled attempted to reference storage while the page table for that storage was paged out. To correct the error, page-fix the storage before a program running disabled attempts to reference it.

* A program attempted to reference storage that had not been obtained. To correct the error, allocate the storage before attempting to reference it.

* A program running in a subspace attempted to reference storage that was not accessible to the subspace at the time of error. To correct the error, ensure that the program running in a subspace references only the storage assigned to that subspace, or storage that can be referenced by all subspaces.


Are you sure, you've replicated the PROD perfectly, in your test environment for this program - not to get any abend? You, possibly, missing something very trivial but for sure, you are - try to check that out.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Aug 01, 2011 5:28 pm
Reply with quote

is there data in : TPROD.BPIC210Z.C19.REPORT.INFILE.PRD ?
or is it an empty file?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Mon Aug 01, 2011 5:37 pm
Reply with quote

A S0C4 abend on a WRITE statement is usually because the file is not open -- you cannot reference a buffer that does not exist. It could have never been opened, or it could have been opened and closed, or the program logic "fell through" into the WRITE.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Aug 01, 2011 6:14 pm
Reply with quote

apandey wrote:
I made just 1 change in JCL and program executed.

In the JCL,
000219 // DISP=(NEW,CATLG,DELETE),
000220 // UNIT=DISK,SPACE=(136,(15,6),RLSE),
000221 // DCB=(LRECL=133,BLKSIZE=23408,RECFM=FBA)

I have changed
000219 // DISP=(NEW,CATLG,DELETE),
000220 // UNIT=DISK,SPACE=(CYL,(15,6),RLSE),
000221 // DCB=(LRECL=133,BLKSIZE=23408,RECFM=FBA)


TS has gone away happy.

It is actually quite interesting, if accurately recorded. I wish he'd let us know about any messages, and what the production JCL looks like.

If a parameter in the JCL caused it, I'd have expected a message or two. If a parameter in the JCL caused it and no message, I'd call that a bug and report it.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


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

PostPosted: Mon Aug 01, 2011 10:49 pm
Reply with quote

I'd guess that the S0C4 -- a deucedly difficult abend to resolve -- is being caused by a wild subscript or a bad pointer derived from production but not test data. If so, the TS may be back...
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 -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
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 How to delete a user's alias from the... JCL & VSAM 11
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top