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
 

 

How to fix the soc7 abend in COBOL

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

New User


Joined: 03 Jan 2006
Posts: 5
Location: india

PostPosted: Fri Oct 26, 2007 11:16 pm    Post subject: How to fix the soc7 abend in COBOL
Reply with quote

Hi,

Can any one help me find out how to fix the soc7 abend...I m getting because of this.....
Code:

03  W10-DIST.                                               
      05  FILLER                                              PIC X(480).     
03  W10-DIST1 REDEFINES W10-DIST.                 
      05  W10-DIST11  OCCURS 20 TIMES.
            07  W10-ACCOUNT-4120                    PIC  X(10).     
            07  W10-CENTER-4120                       PIC  X(10).     
            07  W10-DISTRIB-PCT-4120                PIC S9(03)V9(04)   COMP-3.
03  W10-INVOICE-LINE-AMT-4110                   PIC S9(13)V99 COMP-3.


The data from the database is extracted until DB-END-OF-SET. As the databse had 21 occurances the invoice line amt field in the file was overwritten by the COMP-3 data.
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Oct 26, 2007 11:54 pm    Post subject: Re: SOC7 Abend
Reply with quote

bubu505 wrote:
Hi,

Can any one help me find out how to fix the soc7 abend...I m getting because of this.....
Code:

03  W10-DIST.                                               
      05  FILLER                                              PIC X(480).     
03  W10-DIST1 REDEFINES W10-DIST.                 
      05  W10-DIST11  OCCURS 20 TIMES.
            07  W10-ACCOUNT-4120                    PIC  X(10).     
            07  W10-CENTER-4120                       PIC  X(10).     
            07  W10-DISTRIB-PCT-4120                PIC S9(03)V9(04)   COMP-3.
03  W10-INVOICE-LINE-AMT-4110                   PIC S9(13)V99 COMP-3.


The data from the database is extracted until DB-END-OF-SET. As the databse had 21 occurances the invoice line amt field in the file was overwritten by the COMP-3 data.


Change the occurs 20 times to occurs 21 times or delete 1 item from the DB. You should be checking to make sure you don't exceed the table size.
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Fri Oct 26, 2007 11:55 pm    Post subject: Reply to: SOC7 Abend
Reply with quote

I'm not a cobol programmer, but if you have 21 occurences of an invoice line amount and your are only defined to accept 20, wouldn't you need to add an additional occurance.

Code:

03  W10-DIST.                                               
      05  FILLER                                              PIC X(504).     
03  W10-DIST1 REDEFINES W10-DIST.                 
      05  W10-DIST11  OCCURS 21 TIMES.
            07  W10-ACCOUNT-4120                    PIC  X(10).     
            07  W10-CENTER-4120                       PIC  X(10).     
            07  W10-DISTRIB-PCT-4120                PIC S9(03)V9(04)   COMP-3.
03  W10-INVOICE-LINE-AMT-4110                   PIC S9(13)V99 COMP-3.
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: Sat Oct 27, 2007 12:31 am    Post subject:
Reply with quote

Hello,

Quote:
The data from the database is extracted until DB-END-OF-SET
It would be a good idea to change the code to detect an "overrun" and react accordingly. You could read until e-o-s or when the limit has been reached. If the e-o-s has been reached, continue processing. If the limit has been reached, do whatever is needed - even a controlled termination with an appropriate message.

If you change the 20 to 21 and some time later have 22 entries, you will have another "ungraceful" abend. . .
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 IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm


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