Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : INITIALIZE will not initialize FILLER inside a group item.

Google
 
Web mainframegurukul.com

How to resolve soc7?

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL
  View previous topic :: View next topic  
Author Message
Lohith
Member


Joined: 06 Nov 2008
Posts: 3

PostPosted: Thu Nov 06, 2008 6:41 pm    Post subject: How to resolve soc7? Reply with quote

Hi frnds,
I'm new to mainframe technology. I want to know the step by step method to resolve soc7 abend without using any tools(abend tools).
please guide me.

thanks,
lohit
Back to top
View user's profile Send private message Send e-mail

dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 720

PostPosted: Thu Nov 06, 2008 7:55 pm    Post subject: Reply with quote

start by looking at a cobol/asm/pl1 application programmers guide under the subject of debuging. not only will some things be explained, but links to other manuals will be given; the other manuals will go into depth about debugging.

You could also google, looking for 'how to resolve soc7'.
_________________
Dick Brenholtz
The only thing worse than waking up late,
is waking up the day before you wished it was.
Back to top
View user's profile Send private message
Lohith
Member


Joined: 06 Nov 2008
Posts: 3

PostPosted: Fri Nov 07, 2008 10:41 am    Post subject: Reply with quote

thanks.............
Back to top
View user's profile Send private message Send e-mail
Natarajan
Moderator


Joined: 10 Oct 2008
Posts: 535
Location: chennai

PostPosted: Fri Nov 07, 2008 1:12 pm    Post subject: SOC7 abend in COBOL S0C7 Reply with quote

Lohith,

here is some info which i have.

If you get S0C7 means some of your numeric variables/data items have invalid data. now we need to find out how to do this.

while compiling use compiler option LIST. it will give listing of your cobol program in spool.

Now, run your program, it will abend will with S0C7
go to spool and take the last four bytes of offset.

open the compiler listing and find those 4 bytes in the compiler listing.
you can find the position, where S0C7 occured.

In this way , we can find the position where S0C7 error got generated.

If you need any other help, let us know.
_________________
Natarajan
Chennai


Last edited by Natarajan on Mon Aug 03, 2009 9:13 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
Lohith
Member


Joined: 06 Nov 2008
Posts: 3

PostPosted: Wed Nov 12, 2008 1:50 pm    Post subject: Reply with quote

natarajan,
i got the offset address, but i could not find in which line it is showing abend.
Back to top
View user's profile Send private message Send e-mail
Natarajan
Moderator


Joined: 10 Oct 2008
Posts: 535
Location: chennai

PostPosted: Tue Nov 18, 2008 3:38 pm    Post subject: SOC07 ABEND in COBOL program Reply with quote

This example may help you.

step 1. check spool details of run job.
You will find a line similar to following.

Code:

offset +00000AB6 at entry offset +00000AB6


copy last 4 bytes of offset i.e., copy 0AB6


step 2. go to spool details of compile job.
go to sysprint
find 0AB6
you can find the statement as shown in below example.

00345 MOVE
000SE0 5830 9134 L 3,308(0,9) BLF=0
000ER0 5840 9138 L 4,312(0,9) BLF=1
000AB6 F944 3000 4000 CP 0(5,3),0(5,4) NUMBER-X


Just few lines above the line, where you have found 4 digit offset number, you can find the cobol verb , that is where COBOL program abended with SOC7. In above example, cobol program abended with SOC7 at MOVE statement.

Let me know, if you still have questions on solveing SOC7 abend in COBOL program.
_________________
Natarajan
Chennai
Back to top
View user's profile Send private message Visit poster's website
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1349
Location: Mumbai, India

PostPosted: Sat Nov 22, 2008 7:22 am    Post subject: Reply with quote

Hi,

Do you have a product called Abend Aid?
_________________
Anuj


//MYWALLET EXEC PGM=SPOUSE
//SYSIN DD DSN=MYWALLET.ALL,DISP=SHR
//SYSOUT DD DUMMY
Back to top
View user's profile Send private message
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1349
Location: Mumbai, India

PostPosted: Sat Nov 22, 2008 7:23 am    Post subject: Reply with quote

Hi,

The idea is to add the given displacement to the address given by the base register. And it is hexadecimal addition, so don't forget your base 16 math.

Then you scan down your dump to the given address and read the instruction, checking the contents of the fields. It really helps when you have a yellow IBM instruction card which shows the hexadecimal equivalents of the commands.

But even that won't help unless you know enough Assembler to realize that MVC is a Move Character command, and that the first field after the command is the RECEIVING field contents and the second is the sending field contents.

And unless your compile is done with the Assembler listing, that won't help much, because then you have to take the Assembler instruction back to your COBOL code to figure out what fields are being referenced by the abending command.
_________________
Anuj


//MYWALLET EXEC PGM=SPOUSE
//SYSIN DD DSN=MYWALLET.ALL,DISP=SHR
//SYSOUT DD DUMMY


Last edited by Anuj Dhawan on Thu Nov 03, 2011 12:58 pm; edited 1 time in total
Back to top
View user's profile Send private message
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1349
Location: Mumbai, India

PostPosted: Sat Nov 22, 2008 7:34 am    Post subject: Reply with quote

Hi again,

I hit enter little early ..let's continue from last post..

So how do you do this quickly and easily? You have to know what causes what errors - basically, you have to understand your data.

S0C7 is a data exception. This most commonly means that a numeric value has had something done to it that results in it being placed in an alphanumeric field. So start with your numeric fields. Pic 9(nn) fields are very forgiving, so start your research with your COMP fields (COMP, COMP-3, etc.).

Because you got a S0C7, I can safely assume this is a batch job and you are dealing with standard input files. Input files have copybook layouts. Look at the copybook. Find the "packed" (COMP) fields. Using the layout positions, use File-Aid to scan the file for non-numeric data in these fields.

File-Aid option 8 from the main menu allows you to get a file layout froma copybook. This tells you what position the particular field starts in and how long it is. Here is an example:
Code:
                 09 DL-VAR-NUM01-05           PIC S9(05)V COMP-3. ...
                 09 DL-VAR-NUM02-04           PIC S9(04)V COMP-3. ...
                 09 DL-VAR-NUM03-03           PIC S9(03)V COMP-3. ...
                 09 DL-VAR-CH01-01                    PIC X(01).  ...
                 09 DL-VAR-CH02-18                    PIC X(18).  ...

Here are three packed fields. I go to File-Aid F.8 to get the copybook layout and find where these fields are in the actual file:
Code:
File-AID ---------------------- VIEW LAYOUT ------------ Row 24 to 44 of 1,850
COMMAND ===>                                                  SCROLL ===> CSR 
Layout: MVD.ENVA.PANVALET(DLVAR512)                                           
                                                 FIELD                         
--------- FIELD LEVEL/NAME ---------- -PICTURE- -NUMBER START     END  LENGTH 
      9 DL-VAR-DT05                   X(10)         20     53      62      10 
      9 DL-VAR-NUM01-05               S9(5)         21     63      65       3 
      9 DL-VAR-NUM02-04               S9(4)         22     66      68       3 
      9 DL-VAR-NUM03-03               S999          23     69      70       2 
      9 DL-VAR-CH01-01                X             24     71      71       1 

This tells me that I am looking for my first packed field to start in column 63 for a physical length of 3, ending in column 65. (63, 64, 65 makes three physical columns).

Then, again using File-Aid, I would look for nonnumeric values in these columns. Remember that characters are less than numbers in the mainframe world, so I can search any or all of these columns for data less than zero (for the purpose of this example, I took the liberty of using a different file):
Code:
File-AID -------------  Unformatted Selection Criteria  ------ Row 1 to 1 of 1
COMMAND ===>                                                  SCROLL ===> CSR 
                                                                               
Use END to continue, CANCEL to return to main screen.                         
                                                                               
    AND                                                                       
Cmd /OR Position Length RO                      Data Value                     
--- --- -------- ------ -- ----------------------------------------------------
___      9       3      LT T'0'                                               
************************** END OF SELECTION CRITERIA **************************

And this gives me my offending record (or records, as the case may be).
Code:
File-AID - Edit - MV603.NON.NUMERIC -----------------------------------------------------------------------------------------------
COMMAND ===>                                                                                                      SCROLL ===> CSR 
       ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0-
****** ******************************************************* TOP OF DATA ****************
- - -  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 31 RECORD(S) NOT SELECTED
000001 D5013290ABC531074057839092061C          E3C                                                                                 
- - -  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 44 RECORD(S) NOT SELECTED
****** ****************************************************** BOTTOM OF DATA *********


Hope this helps..
_________________
Anuj


//MYWALLET EXEC PGM=SPOUSE
//SYSIN DD DSN=MYWALLET.ALL,DISP=SHR
//SYSOUT DD DUMMY
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts IAM BEGINNER IN JCL ...PLZ HELP ME 7 Guest 19421 Fri Sep 23, 2011 10:50 pm
DikDude View latest post
No new posts Mainframe Simulator 4 Chandra Shekar G R 5356 Sat Jul 31, 2010 1:36 pm
Anuj Dhawan View latest post
No new posts Mainframe Positions 3 Kyle 6959 Sun Apr 22, 2007 1:01 am
rayala_uday View latest post
No new posts Free Login Id for any Mainframe Server 1 jyoti 5196 Sat Apr 21, 2007 8:14 pm
guru View latest post
No new posts What is the command in mainframe avoid auto signout(TIMEOUT) 5 rajendra.pallala 7960 Fri Jan 26, 2007 12:48 am
seagreg View latest post
 



This widget requires Flash Player 9 or better








Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB

mainframetopic-3586.html