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
 

 

Help needed to fix S0C7 abend
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Fri Oct 12, 2007 9:21 am    Post subject: Help needed to fix S0C7 abend
Reply with quote

Hi,

I am getting S0C7 abend and trying for hours to fix it. can someone please let me know how to find the variable causing teh error using the offset in teh abend report. Any help would be greatly appreciated.
Back to top
View user's profile Send private message

agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Fri Oct 12, 2007 9:27 am    Post subject:
Reply with quote

Please refer this Link
See the post by Jack (mmwife)
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Fri Oct 12, 2007 9:42 am    Post subject:
Reply with quote

Take the offset where you got the error. Go to program listing and find this offset, then you will get the line number causing the abend. Chenck the line program to find the variable for this abend. First check whether all of your data is properly initialized or not.
Back to top
View user's profile Send private message
hemanth.nandas

Active User


Joined: 18 Aug 2007
Posts: 120
Location: Chennai

PostPosted: Fri Oct 12, 2007 10:25 am    Post subject:
Reply with quote

HI Satyaraj,

Welcome To Forum..

Quote:
S0C7 abend and trying for hours to fix it


There are more reason which cuases this abend.
Check All the possibilities.
1) Working-storage INTIALIZATION
2) Moving Non-Numeric item to Numeric item (Bad Data)
3) Out of Index
4) etc.

To Check all this and Debugg the same,

1. Use SYSUDUMP in your JCL,
2. Take the Offset of the variable Where you had got ERROR,
3. Match for the same in PROGRAM LISTING, Get the line Number, Then Locate For the same which directs you to the command/variable.

Which Version control are you using?

If Endevor, Go To Foot Print Listing, Find Offset, Which gives Command as well Line number.

Then Fix It.

Anyhow, If it Doesn't work out, Then Post your problem Very clearly, I mean under Which environmemt(contorl version) you are running this?
Back to top
View user's profile Send private message
hemanth.nandas

Active User


Joined: 18 Aug 2007
Posts: 120
Location: Chennai

PostPosted: Fri Oct 12, 2007 10:28 am    Post subject:
Reply with quote

Hi Moderator,

Please Change Code to Quote
Back to top
View user's profile Send private message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Fri Oct 12, 2007 2:19 pm    Post subject:
Reply with quote

Thnx every one for your support.

I am passing a numeric data from a table variable to a vsam file key feild. Then I am trying to read the records in the file for the corresponding feilds. Even the key feild is numeric so I dont know where the actual problem is. How can i go with this..?
Back to top
View user's profile Send private message
nuthan

Active User


Joined: 26 Sep 2005
Posts: 146
Location: Bangalore

PostPosted: Fri Oct 12, 2007 2:22 pm    Post subject:
Reply with quote

Use DISPLAY statement to diaplay ur variable which you have received from table and check whether its the valid numeric vlaue or not.
Back to top
View user's profile Send private message
hemanth.nandas

Active User


Joined: 18 Aug 2007
Posts: 120
Location: Chennai

PostPosted: Fri Oct 12, 2007 2:39 pm    Post subject:
Reply with quote

Hi Satyaraj,

Quote:
I am passing a numeric data from a table variable to a vsam file key feild. Then I am trying to read the records in the file for the corresponding feilds


Explain it clearly, I mean Which file you are reading again for corresponding field?

Whats content of Table value? Had you checked it? Are you intialized Host Variables and VSAM Key field variables? Are you usiong Index?

Post your problem with little more explaination? Also Follow as Nuthan said.
Back to top
View user's profile Send private message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Fri Oct 12, 2007 3:13 pm    Post subject:
Reply with quote

@ nuthan

I checked the table variable its numeric.

@ hemanth

Lets pressume that the table has the list of department codes. the VSAM file has data for which dep code is the key. I want only the data for the Dep codes in the table. The working variables and teh key feilds are initialised. I am calling a separate program to initialise the VSAM file using a copy book.

Thnx both of you for the support. please let me know if you need more clarity in this.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Fri Oct 12, 2007 3:19 pm    Post subject:
Reply with quote

Sathya
Ok. We know that variable is numeric. We are saying that content of it is NOT. (Thats why you get S0C7)

From your posts I can see that you havent really found the offending variable. If you could atleast post your code then we may be able to help. (Just the relavent portion).
Back to top
View user's profile Send private message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Fri Oct 12, 2007 3:35 pm    Post subject:
Reply with quote

my input file declaration

FD CUST-FILE
LABEL RECORDS ARE STANDARD
RECORDING MODE IS F
BLOCK CONTAINS 0 RECORDS
RECORD CONTAINS 80 CHARACTERS
DATA RECORD IS CUST-INPUT-RECORD.

01 CUST-INPUT-RECORD.
05 CUST-NUM PIC 9(07).
05 CUST-IP PIC 9(01).
05 FILLER PIC X(72).



Table declaration

01 WS-PLAN-TABLE.
05 WS-HOLD-TABLE-RECORD OCCURS 2000 TIMES.
10 WS-CUST-NO PIC 9(07) VALUE ZEROES.
10 WS-CUST-IP PIC 9(01) VALUE ZEROES.

Passing the table variable to the key


MOVE LOW-VALUES TO ORG-CES-32-BYTE-KEY
MOVE WS-CUST-NO(SUB-TAB) TO ORG-CES-KEY-CUSTOMER-NUMBER
PERFORM 5100-READ-INFORCE
THRU 5100-EXIT.

The reading part

*------------------*
5100-READ-INFORCE.
*------------------*

MOVE K-READ-NEXT TO USG-REQUEST-CODE
CALL USG-INFORCE-IO-PGM USING
STANDARD-CES-USING-AREA
ORIG-CES-AREA
NEW-CES-AREA
ORIG-JOBCNTRL-AREA.


IF RETURN-IO-SUCCESSFUL-IN-USG
THEN
ADD K-1 TO CTR-INF-RECORD-COUNT
IF ORG-CES-KEY-CUSTOMER-NUMBER NOT EQUAL
WS-CUST-NO(SUB-TAB)
THEN
MOVE SW-ON TO SW-EOF
END-IF
ELSE
IF RETURN-END-OF-FILE-IN-USG
OR RETURN-RECORD-NOT-FOUND-IN-USG
THEN
MOVE SW-ON TO SW-EOF

Please let me know if you need anything else..
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Fri Oct 12, 2007 3:48 pm    Post subject:
Reply with quote

Did you follow my first post in this thread and found out the offending line?
I don't think you did.

I assume that you are sure that you are getting abend in one of the instructions posted above.
Now add display statements in the program above to display all the variables used in below code.

ADD K-1 TO CTR-INF-RECORD-COUNT

IF ORG-CES-KEY-CUSTOMER-NUMBER NOT EQUAL
WS-CUST-NO(SUB-TAB)
You get S0C7 when you try to do arithmatic operation on Non numeric data.
One more question why are moving low values in ORG-CES-32-BYTE-KEY ?
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Mon Oct 15, 2007 3:48 am    Post subject:
Reply with quote

moving low-values to a vsam key is common practice if you are preparing
for browsing a file and want to start with first record in the file.


for the OC7, if you are NOT blowing up at
ADD K-1 TO CTR-INF-RECORD-COUNT

then
my guess is the record you are reading contains
garbage in field ORG.CES-KEY-CUSTOMER=NUMBER,


are you sure you have successfully read a record before the
comparison?

i would verify that switch RETURN-IO-SUCCESSFUL-IN-USG
is set properly
Back to top
View user's profile Send private message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Mon Oct 15, 2007 9:34 am    Post subject:
Reply with quote

Hi Every one,

I ran the code using xpeditor and found that the problem occurs when the code is trying to read the VSAM file. the return code is 10(End of file or no records matching to the key) But i manually checked the VSAM file in file-aid to find the records there. Any guesses for the possible causes for this error..?
Back to top
View user's profile Send private message
sathyaraj

New User


Joined: 28 Sep 2007
Posts: 71
Location: India.

PostPosted: Mon Oct 15, 2007 9:40 am    Post subject:
Reply with quote

Sagar,

I tried to locate the offset. The parm LIST is working fine.. but am not able to use the parm NOOFF... its throwing an error... INVALID PARM...
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Mon Oct 15, 2007 7:20 pm    Post subject:
Reply with quote

endof FILE?

thats your problem.
you can not compare against a record that is not there.

change your program to NOT do the compare, when there is a non-zero
response from the read


see my previous reply
then
my guess is the record you are reading contains
garbage in field ORG.CES-KEY-CUSTOMER=NUMBER,


are you sure you have successfully read a record before the
comparison?
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Oct 15, 2007 8:21 pm    Post subject:
Reply with quote

Hi Sathyaraj,

You may want to try the following:
Code:
****** ***************************** Top of Data ******************************
000001        CBL NOOFF,LIST                                                   
000002        IDENTIFICATION  DIVISION.                                       
000003        PROGRAM-ID.     XXXXXX.                                       
000004        AUTHOR.         JACK xxx.                                   
000005       ******************************************************************
000006       * CHG DATE  |SVC REQ#|CHG AGT|DESCRIPTION                        *
000007       *=================================================================
000008       * 02/20/2007|00001557|Jx9999 |NEW PGM                            *
000009       ******************************************************************

I've been using it for years and it works fine.
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: Mon Oct 15, 2007 8:28 pm    Post subject:
Reply with quote

Hello,

Quote:
I tried to locate the offset. The parm LIST is working fine.. but am not able to use the parm NOOFF... its throwing an error... INVALID PARM...
If you post the actual bit of code/jcl that you submitted, we may be able to offer suggestions.
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Mon Oct 15, 2007 9:01 pm    Post subject:
Reply with quote

looks to me like it is endof file condition causing the problem,

You are checking for endof file condition at wrong place in your logic.

your current code is falling through to the comparison on record-key,
you have no valid record in storage at that point.

change your code ..

to do this >>>

IF RETURN-END-OF-FILE-IN-USG
OR RETURN-RECORD-NOT-FOUND-IN-USG
MOVE SW-ON TO SW-EOF

THEN
ELSE
IF RETURN-IO-SUCCESSFUL-IN-USG
THEN
ADD K-1 TO CTR-INF-RECORD-COUNT
IF ORG-CES-KEY-CUSTOMER-NUMBER NOT EQUAL
WS-CUST-NO(SUB-TAB)
THEN
MOVE SW-ON TO SW-EOF
END-IF
ELSE
DISPLAY 'LOGIC PROBLEM'.
Back to top
View user's profile Send private message
kris22_24

New User


Joined: 28 Oct 2006
Posts: 18

PostPosted: Wed Oct 17, 2007 2:21 pm    Post subject: Reply to: Help needed to fix S0C7 abend
Reply with quote

1)Refer the sysout of the job and get the next sequential instruction to be executed (offset)

2) Compile the program with LIST option

3)Check for the offset in the compilation list and get the respective statement number

4) Identify the statement this would be a numeric operation

5) Identify the source of the numeric data and correct it.
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 -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts Help Needed with View Direct shailesh_do CA Products 2 Wed Jul 13, 2016 10:39 am
No new posts S213-14 ABEND explantion Apurva Mehta JCL & VSAM 5 Thu Jul 07, 2016 10:56 pm


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