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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm


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