Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Abend S0C4 in DSNHLI when Open Cursor in a batch program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Abend S0C4 in DSNHLI when Open Cursor in a batch program
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    Post subject:
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    Post subject:
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: 2180
Location: @my desk

PostPosted: Wed Dec 17, 2008 10:01 pm    Post subject:
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    Post subject: Reply to: Abend S0C4 in DSNHLI when Open Cursor in a batch p
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: 2180
Location: @my desk

PostPosted: Wed Dec 17, 2008 10:12 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us