View previous topic :: View next topic
|
Author |
Message |
sandeep kumar302
New User
Joined: 14 Mar 2012 Posts: 81 Location: India
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
Do you have the message that indicates the offset in the load module where the abend occurred? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
What did you get from the sysout of your step? |
|
Back to top |
|
|
sandeep kumar302
New User
Joined: 14 Mar 2012 Posts: 81 Location: India
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
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 |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1248 Location: Richfield, MN, USA
|
|
|
|
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 |
|
|
sandeep kumar302
New User
Joined: 14 Mar 2012 Posts: 81 Location: India
|
|
|
|
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 |
|
|
sandeep kumar302
New User
Joined: 14 Mar 2012 Posts: 81 Location: India
|
|
|
|
I can see the below in the dump-
Code: |
Condition processing resulted in the unhandled condition.
|
|
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
CEEDUMP ==> Helps you in finding the last processed data with value of fields did you try looking into it? |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
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 |
|
|
sandeep kumar302
New User
Joined: 14 Mar 2012 Posts: 81 Location: India
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Probably in SDSF.... |
|
Back to top |
|
|
sandeep kumar302
New User
Joined: 14 Mar 2012 Posts: 81 Location: India
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
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 |
|
|
sandeep kumar302
New User
Joined: 14 Mar 2012 Posts: 81 Location: India
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Can we see the contents of the ICCHGPCT file ? |
|
Back to top |
|
|
sandeep kumar302
New User
Joined: 14 Mar 2012 Posts: 81 Location: India
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
sandeep kumar302
New User
Joined: 14 Mar 2012 Posts: 81 Location: India
|
|
|
|
Thanks Bill,
The problem was with input file. I corrected it and then the issue was resolved.
thanks a lot |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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.
|
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
My bad, added the COMP-3 word but forgot to recalculate the FILLER size.
It was late and I forgot my compiler at work.
|
|
Back to top |
|
|
|