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
 

 

S0C4 Abend in COBOL STORED PROCEDURE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Sat Dec 18, 2010 4:04 am    Post subject: S0C4 Abend in COBOL STORED PROCEDURE
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    Post subject:
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: 85
Location: Bangalore

PostPosted: Thu Dec 23, 2010 8:41 pm    Post subject:
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

Site Director


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

PostPosted: Thu Dec 23, 2010 10:19 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts C03 ABEND sjiraga PL/I & Assembler 1 Thu Jun 01, 2017 4:51 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am


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