IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SOC7 abend- How to resolve it


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sandeep kumar302

New User


Joined: 14 Mar 2012
Posts: 81
Location: India

PostPosted: Wed Apr 30, 2014 5:57 pm
Reply with quote

I am getting SOC7 abend and not able to fix it. I know it is caused due to any one of the following-

1. Numeric data was not initialized.
2. A subscript or index contained an invalid value.
3. A comp-3 field had an invalid sign.
4. A group move overlaid a numeric field with non-numeric data.

Important parts of the program:
Code:

     SELECT IN-COST-CHG-PRCNT
            ASSIGN TO         ICCHGPCT
            STATUS            WS-ICCHGPCT-FS.
*
 DATA DIVISION.
 FILE SECTION.
*
 FD  IN-COST-CHG-PRCNT
     RECORDING MODE F
     BLOCK CONTAINS 0 RECORDS.
 01  IN-COST-CHG-FILE-RECORD.
     05  FILLER             PIC X(01).
     05  COST-CHG-PERCENT   PIC 9(3)V99.
     05  FILLER             PIC X(74).

WORKING-STORAGE SECTION.

01  RSNBLTY-CHECK-PARM.
    05  FILLER                      PIC X(39).
    05  WS-RSNCHK-RANGE-START       PIC 9(02).
    05  FILLER                      PIC X(04).
    05  WS-RSNCHK-RANGE-END         PIC 9(02).
    05  FILLER                      PIC X(33).

PRODEDURE-DIVISION.
 2000-REASONABILITY-CHECK-PARA.
*-----------------------------*
     MOVE '2000-PROCESS-PARA' TO WS-PARANAME
D    DISPLAY WS-PARANAME

     DISPLAY ' '
     ACCEPT RSNBLTY-CHECK-PARM FROM SYSIN
     DISPLAY 'RSNBLTY-CHECK-PARM: ' WS-RSNCHK-RANGE-START
     IF WS-RSNCHK-RANGE-START NOT NUMERIC   OR
        WS-RSNCHK-RANGE-END   NOT NUMERIC
        DISPLAY 'ERROR!!! REASONABILITY CHECK RANGE NOT NUMERIC'
        DISPLAY 'SETTING RETURN CODE TO 1'
        MOVE 1 TO RETURN-CODE
     ELSE
        DISPLAY 'ACCEPTABLE COST CHANGE RANGE: '
                WS-RSNCHK-RANGE-START '%' ' - '
                WS-RSNCHK-RANGE-END   '%'
     END-IF

     DISPLAY 'COST CHANGE % FROM IN-COST-CHG-PRCNT FILE: '
             COST-CHG-PERCENT '%'
     DISPLAY ' '
     DISPLAY ' '
     DISPLAY 'COST-CHG-PERCENT: ' COST-CHG-PERCENT
     DISPLAY 'WS-RSNCHK-RANGE-START: 'WS-RSNCHK-RANGE-START
     DISPLAY 'WS-RSNCHK-RANGE-END: 'WS-RSNCHK-RANGE-END

     IF COST-CHG-PERCENT >= WS-RSNCHK-RANGE-START AND
        COST-CHG-PERCENT <= WS-RSNCHK-RANGE-END
        DISPLAY '!!! REASONABILITY CHECK SATISFIES !!!'
     ELSE
        DISPLAY '!!! ALERT -  REASONABILITY CHECK FAILED !!!'
        DISPLAY 'SETTING RETURN CODE TO 2'
        MOVE 2 TO RETURN-CODE
     END-IF
     .
 2000-REASONABILITY-CHECK-EXIT.
*-----------------------------*
      EXIT.


i tried to follow the below link - ibmmainframes.com/viewtopic.php?t=6762
but not able to figue it out in the compile listing

My JCLstep is:

Code:

//PSTY0010 EXEC PGM=RP30H99C,COND=(4,LT)
//ICCHGPCT DD  DSN=CPISXK.COST.CHANGE.PERCENT,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//SYSPRINT DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SORTMSG  DD  SYSOUT=*
//SYSIN    DD  DSN=CPISXK.TEST.SYSIN(RPCCCHEK),DISP=SHR
//*


and the SYSIN is:

Code:

---------------------------------
----+----1----+----2----+----3----+----4----+----5----+----6-
***************************** Top of Data *******************
COST CHANGE REASONABILITY CHECK RANGE: 07 TO 14
                                       ||    ||
                                       ||    ||
                                       ||    RANGE END OFFSET
                                       ||
                                       RANGE START OFFSET


Please help[/code]
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1787
Location: Bloomington, IL

PostPosted: Wed Apr 30, 2014 6:04 pm
Reply with quote

Do you have the message that indicates the offset in the load module where the abend occurred?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Apr 30, 2014 6:06 pm
Reply with quote

What did you get from the sysout of your step?
Back to top
View user's profile Send private message
sandeep kumar302

New User


Joined: 14 Mar 2012
Posts: 81
Location: India

PostPosted: Wed Apr 30, 2014 6:11 pm
Reply with quote

the sysout says as-

The system detected a data exception (System Completion Code=0C7).
From compile unit RP30H99C at entry point RP30H99C at compile unit unit offset +00000C28 at entry offset +00000C28
at address 13E00E18.
ENTERED (LEVEL 06/15/2011 AT 18.20)
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1787
Location: Bloomington, IL

PostPosted: Wed Apr 30, 2014 6:43 pm
Reply with quote

sandeep kumar302 wrote:
the sysout says as-

The system detected a data exception (System Completion Code=0C7).
From compile unit RP30H99C at entry point RP30H99C at compile unit unit offset +00000C28 at entry offset +00000C28
at address 13E00E18.
ENTERED (LEVEL 06/15/2011 AT 18.20)

So, if your compile listing has the generated pseudo-assembler, find offset C28 and find what source statement includes it. If not, re-compile with (IIRC) the LIST and NOOFFSET options, and find the offset and source statement in that listing.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1248
Location: Richfield, MN, USA

PostPosted: Wed Apr 30, 2014 6:46 pm
Reply with quote

Find the field that gave you the S0C7, then look for all references to that field. You may need to backtrack a lot. Look for C28 in your compile listing.
Back to top
View user's profile Send private message
sandeep kumar302

New User


Joined: 14 Mar 2012
Posts: 81
Location: India

PostPosted: Wed Apr 30, 2014 6:57 pm
Reply with quote

Hi Akatsukami & Terry,
Thanks fof te prompt reply but i am not able to track any source statemtnt in the CEEDUMP.

my spool contains-

JESMSGLG JES2 2 CPISXK X LOCAL 34
JESJCL JES2 3 CPISXK X LOCAL 181
JESYSMSG JES2 4 CPISXK X LOCAL 193
SYSPRINT JS0010 PC 101 CPISXK X LOCAL 34
SYSTERM JS0010 PC 102 CPISXK X LOCAL 9
SYSUT2 JS0010 GENER 104 CPISXK X LOCAL 656
SYSPRINT JS0010 GENER 105 CPISXK X LOCAL 4
SYSPRINT JS0010 LKED 106 CPISXK X LOCAL 183
SYSOUT PSTY0010 107 CPISXK X LOCAL 25
CEEDUMP PSTY0010 111 CPISXK X LOCAL 343
Back to top
View user's profile Send private message
sandeep kumar302

New User


Joined: 14 Mar 2012
Posts: 81
Location: India

PostPosted: Wed Apr 30, 2014 7:00 pm
Reply with quote

I can see the below in the dump-
Code:

Condition processing resulted in the unhandled condition.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Apr 30, 2014 7:01 pm
Reply with quote

CEEDUMP ==> Helps you in finding the last processed data with value of fields did you try looking into it?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1787
Location: Bloomington, IL

PostPosted: Wed Apr 30, 2014 7:04 pm
Reply with quote

sandeep kumar302 wrote:
Hi Akatsukami & Terry,
Thanks fof te prompt reply but i am not able to track any source statemtnt in the CEEDUMP.

Did I not say, "Find the source statement in the compile listing"? Why do you think it might be found in a dump?
Back to top
View user's profile Send private message
sandeep kumar302

New User


Joined: 14 Mar 2012
Posts: 81
Location: India

PostPosted: Wed Apr 30, 2014 7:09 pm
Reply with quote

Hi Akatsukami,
Apology for this but i am not sure where is the compile listing is present
. i mean is it a SPOOL or a library?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Apr 30, 2014 7:13 pm
Reply with quote

Probably in SDSF....
Back to top
View user's profile Send private message
sandeep kumar302

New User


Joined: 14 Mar 2012
Posts: 81
Location: India

PostPosted: Wed Apr 30, 2014 7:21 pm
Reply with quote

Hi Akatsukami,
I recompiled with-
CBL NOOFFSET LIST
but still i am not able to get any source code.Can you please guide me on how to see in cobol listing.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1787
Location: Bloomington, IL

PostPosted: Wed Apr 30, 2014 7:25 pm
Reply with quote

sandeep kumar302 wrote:
Hi Akatsukami,
I recompiled with-
CBL NOOFFSET LIST
but still i am not able to get any source code.Can you please guide me on how to see in cobol listing.

In the compile step of the compile etc. procedure is a SYSPRINT DD statement. The compiler listing will be written to the destination given in this statement, whether it be a held output class, a member of a PDS, or a printer. Find which it is.
Back to top
View user's profile Send private message
sandeep kumar302

New User


Joined: 14 Mar 2012
Posts: 81
Location: India

PostPosted: Wed Apr 30, 2014 7:25 pm
Reply with quote

In SPOOL,
in sysout when i am trying to display the values-
i am getting-
Code:
COST-CHG-PERCENT:  1 24

and i defined
Code:
COST-CHG-PERCENT   PIC 9(3)V99 COMP-3.


and ideally it should get the value as 12 from the ICCHGPCT file.

Is it the issue?

Code'd
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Apr 30, 2014 7:38 pm
Reply with quote

In the code you gave at the beginning, field COST-CHG-PERCENT is not in COMP-3 format.
You are only getting us as mixed up as you are!
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Apr 30, 2014 7:40 pm
Reply with quote

Can we see the contents of the ICCHGPCT file ?
Back to top
View user's profile Send private message
sandeep kumar302

New User


Joined: 14 Mar 2012
Posts: 81
Location: India

PostPosted: Wed Apr 30, 2014 7:47 pm
Reply with quote

Hi Marso,
Oh i am sorry, actually later i changed it while testing. Anyways it is not working with both the formats.

The content of the ICCHGPCT file is -

Code:
Command ===>
=COLS> ----+----1
****** **********
000001  12


afte the 3 column, everything is empty and the Record length is 80( i have not pasted full LRECL here)


Code'd
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Apr 30, 2014 9:05 pm
Reply with quote

Have you been re-typing rather than pasting?

Have you decided whether to provide the earlier information I asked for?

Why did you thing 12 followed by three blanks could be adequately described by PIC 9(3)V99?

Earlier in your program you check for NUMERIC, but continue with the next code anyway. When you do get non-numeric, you will get a S0C7. That is one way with your code, and the output I asked for from your DISPLAYs would affirm or discount that as the actual cause for your S0C7.

If you can't find the compile listing, ask a colleague. It will be much quicker and more certain than asking us.
Back to top
View user's profile Send private message
sandeep kumar302

New User


Joined: 14 Mar 2012
Posts: 81
Location: India

PostPosted: Wed Apr 30, 2014 10:00 pm
Reply with quote

Thanks Bill,
The problem was with input file. I corrected it and then the issue was resolved.

thanks a lot
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Apr 30, 2014 10:21 pm
Reply with quote

Thanks for letting us know.

If you have not corrected where you identify non-numeric but still allow the field to be used later, you may have other problems with this. Test for numeric for user-entered data, excellent. Identify it as not numeric, then still use it, not so good.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu May 01, 2014 10:21 pm
Reply with quote

In your DISPLAYs, add delimiters, just like this:
Code:
    DISPLAY 'COST-CHG-PERCENT=<' COST-CHG-PERCENT '>'
then when you see
Code:
COST-CHG-PERCENT=<12   >
you can immediately see that your number contains non-numeric characters (a.k.a. "junk")
It's as easy as it gets.
icon_smile.gif
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu May 01, 2014 11:23 pm
Reply with quote

sandeep kumar302 wrote:
Hi Marso,
Oh i am sorry, actually later i changed it while testing. Anyways it is not working with both the formats.

The content of the ICCHGPCT file is -

Code:
Command ===>
=COLS> ----+----1
****** **********
000001  12


afte the 3 column, everything is empty and the Record length is 80( i have not pasted full LRECL here)


Code'd
Most likely the editor filled with SPACES.
When you've tried the COMP-3 option, did you enter the hex code with the editor?
If yes, you would have seen that the last zeroes are important, the line starting with X'4001200F', as stated here:
Code:
 01  IN-COST-CHG-FILE-RECORD.
     05  FILLER             PIC X(01).
     05  COST-CHG-PERCENT   PIC 9(3)V99 COMP-3.
     05  FILLER             PIC X(74).
All the rest should stay X'40' as in SPACES.

About that:
sandeep kumar302 wrote:
the Record length is 80( i have not pasted full LRECL here)
It takes less words to give the plain values:
simply wrote:
LRECL(80) RECFM(FB)
If the block size is relevant to the question, give it also: BLKSIZE(3120) for example, it's still shorter and it gives a better picture.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri May 02, 2014 3:38 am
Reply with quote

Marso,

IN-COST-CHG-FILE-RECORD is 78-Bytes.

The 74-Byte FILLER at the end needs to be PIC X(76) for an 80-Byte LRECL.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Fri May 02, 2014 11:31 am
Reply with quote

My bad, added the COMP-3 word but forgot to recalculate the FILLER size.
icon_redface.gif
It was late and I forgot my compiler at work.
icon_confused.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Call an hlasm from REXX in batch and ... CLIST & REXX 4
No new posts What is the most complex abend you've... Mainframe Interview Questions 8
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts Need help to resolve a hard edit COBOL Programming 8
This topic is locked: you cannot edit posts or make replies. Need help to resolve a hard edit COBOL Programming 4
Search our Forums:

Back to Top