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

Abend S0C4 in DSNHLI when Open Cursor in a batch program


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pleonard

New User


Joined: 20 Sep 2006
Posts: 19

PostPosted: Wed Dec 17, 2008 8:58 pm
Reply with quote

I have experienced an abend S0C4 in DSNHLI when I try to open a cursor in a batch processing. Does anyone knows why it is happens ?

Paulo
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Dec 17, 2008 9:10 pm
Reply with quote

no,
but if you were to provide a sample of your sql,
how you are running the program (COBOL, PL1, C, ??)
and your environment (z/os, 390, r-series, MVS, VS, db2 vsn 6,7,8?)
someone could help.

S0C4's are an address violation.

are any of your host variables in linkage?
Back to top
View user's profile Send private message
pleonard

New User


Joined: 20 Sep 2006
Posts: 19

PostPosted: Wed Dec 17, 2008 9:18 pm
Reply with quote

Hi

The program is COBOL (Enterprise 3.4) - z;Os

The piece of the program is

S4200-BILLING-SPAN SECTION.

prl display 'inside s4200'

*****EXEC SQL
***** DECLARE BILLING-SPAN-CR CURSOR FOR
***** SELECT FK_EMPGRP_LVL_1_ID ,
***** FK_BILL_ENT_ID ,
***** LAST_MAINT_TS
***** FROM BILLING_SPAN
***** WHERE BILL_TO_INDICATOR IN ('GP','DV','RU'
*****END-EXEC
prl display 'inside s4200-DECLARE'
prl display 'sqlcode=' sqlcode

EVALUATE TRUE
WHEN SQLCODE = +0
CONTINUE
WHEN OTHER
MOVE C-U5240 TO W-ABEND-CODE
PERFORM S9999-SHOW-STOPPER
END-EVALUATE

prl display 'inside s4200-OPEN1'
nterprise COBOL for z/OS 3.4.1 MTVPMCB1 Date 1
----+-*A-1-B--+----2----+----3----+----4----+----5----+----6--
*****EXEC SQL
***** OPEN BILLING-SPAN-CR
*****END-EXEC
PERFORM SQL-INITIAL UNTIL SQL-INIT-DONE
CALL 'DSNHLI' USING SQL-PLIST21
prl display 'inside s4200-OPEN2'

EVALUATE TRUE
WHEN SQLCODE = +0
CONTINUE


It abend S0C4 in a DSNHLI
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Dec 17, 2008 10:01 pm
Reply with quote

pleonard,

What is the SQLCODE after the Open Cursor?
Back to top
View user's profile Send private message
pleonard

New User


Joined: 20 Sep 2006
Posts: 19

PostPosted: Wed Dec 17, 2008 10:07 pm
Reply with quote

Actually when I try to OPEN CURSOR I got S0C4. That is my problem.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Dec 17, 2008 10:12 pm
Reply with quote

Hi,

Recently we had a similar issue, a program(COBOL-DB2-CICS) which was executing fine a long time suddenly abended in Production. We compiled the same in Test region; but ended up in the same error. It was abending on the very first CALL 'DSNHLI'.

Later we found that due to some recent upgrades done in DB2, the module DSNHLI had some issues. If I remember correctly DSNHLI was present in both the CICS as well as DB2 libraries. The problem got solved by swapping the order of STEPLIB datasets for CICS/DB2 modules.

pleonard,

Did your shop have any recent updates? Is this a totally new program which got abended?
Back to top
View user's profile Send private message
pleonard

New User


Joined: 20 Sep 2006
Posts: 19

PostPosted: Wed Dec 17, 2008 10:21 pm
Reply with quote

This a totally new program COBOL-DB2-batch processing XML document.
I don't have the information about new updates in DB2 but I can ask to my System Administrator.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Calling an Open C library function in... CICS 1
Search our Forums:

Back to Top