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 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