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

S0C4 Abend in COBOL STORED PROCEDURE


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 83
Location: Bangalore

PostPosted: Sat Dec 18, 2010 4:04 am
Reply with quote

Hi
This is a little weird situation that happens when we have a heavy activity (I mean lots of Stored Procedures running at the same time) on the system.
One of our Stored Procedures get a S0C4 when it moves a CLOB variable defined in linkage Section to a working storage variable.

This Stored Procedure runs good 99% and fails 1%.

Below is the code snippet which gives a problem

Code:
WORKING-STORAGE SECTION.
01  GROUP-RECORD-AREA.                               
    05  GROUP-1.                                   
        15  FILLER         PIC  X(06).           
        15  VAR-1          PIC  X(10).           
        15  FILLER         PIC  X(04).           
        15  VAR-2          PIC  X(01).           
        15  VAR-3          PIC  X(01).           
        15  VAR-4          PIC  X(01).           
        15  FILLER         PIC  X(147).           
        15  VAR-5          PIC  X(24).           
    05  GROUP-2            PIC  X(005).           
    05  GROUP-3            PIC  X(004).           
    05  GROUP-4            PIC  X(030).         
    05  GROUP-5            PIC  X(004).         
    05  GROUP-6            PIC  X(030).         
    05  GROUP-7            PIC  9(007).         
    05  GROUP-8            PIC  9(007).         
    05  GROUP-9            PIC  X(10).         
    05  GROUP-10.                         
        10  FILLER         OCCURS 322000 TIMES.
            15  VAR-6      PIC X(13).       

LINKAGE SECTION.                                 
01 IN-MSG          USAGE IS SQL TYPE IS CLOB(4M).

PROCEDURE DIVISION USING IN-MSG.

MOVE IN-MSG TO GROUP-RECORD-AREA.
GOBACK.


The Move Statement gives a S0C 4 when there is a haevy system activity.
Is there something wrong in CLOB declaration or the Move?
Any guesses?
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Sat Dec 18, 2010 4:36 am
Reply with quote

Cobol-in group move, receiving record variable length defined
wrong
Back to top
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 83
Location: Bangalore

PostPosted: Thu Dec 23, 2010 8:41 pm
Reply with quote

I matched the recieving COBOL group same size as CLOB (4M) but still we get the same error. Again we don't get this error always it just happens once in 100 runs
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Dec 23, 2010 10:19 pm
Reply with quote

Hello,

Quote:
Again we don't get this error always it just happens once in 100 runs
Which indicates that the code has a problem with some particular data content. . . Something is going "out of bounds" and you (your organization) are the only one with all of the tools/info needed to resolve. . .

How did you arrive at the size of group-10?

Have you queried the table to make sure that none of these clob columns are larger than expected?

As an experiment, add a new 01 that is inserted after the "group-record-area". I'd use 1 meg for the first test and adjust to see what is really needed. . .
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts ISAM and abend S03B JCL & VSAM 9
Search our Forums:

Back to Top