MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reg S0C7 abend handling

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
munnabai
Beginner


Joined: 17 Aug 2007
Posts: 3
Topics: 3

PostPosted: Sat Sep 20, 2008 3:41 am    Post subject: Reg S0C7 abend handling Reply with quote

Hi,
During processing of a MOVE stattement I got S0C7 Abend. If we get S0C7 I need to write the record which caused this abend into the another error log file and continue my processing. And at the end of the day we need to see the error log file and report to the business testers

Is there anything I can do with the RETURN-CODE register. Like

Code:
IF RETURN-CODE NOT EQUAL ZERO
    Write error Log
END-IF.


I tried such a condition but was not fruitful. Is it possible to handle such a scenario?

Kindly advice and guide me.
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Mon Sep 22, 2008 9:03 am    Post subject: Reply with quote

Abend. Abnormal End. That means the system terminated your program before the normal program end. I'm not aware of any way to trap system abends in a COBOL pgm. What you're describing is editing. Validation. When you know your data might have invalid numeric values, check for that.
Back to top
View user's profile Send private message
Sqlcode
Intermediate


Joined: 15 Dec 2006
Posts: 157
Topics: 38

PostPosted: Mon Sep 22, 2008 2:25 pm    Post subject: Reply with quote

munnabai,

Could you provide us some sample test data? If you know exactly which fields are causing SOC7 abend then you should try using VERIFY operator of DFSORT.

Please find it here :-
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ice1ca10/6.16?ACTION=MATCHES&REQUEST=verify&TYPE=FUZZY&SHELF=&DT=20050222160456&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT

AND

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA10/6.7.5.9?SHELF=&DT=20050222160456


Thanks,
Back to top
View user's profile Send private message
Terry_Heinze
Supermod


Joined: 31 May 2004
Posts: 391
Topics: 4
Location: Richfield, MN, USA

PostPosted: Sun Sep 28, 2008 4:16 pm    Post subject: Reply with quote

Prior to processing every record with the "MOVE" in it, OPEN a log file in your program, WRITE the entire record (or its unique key) to the file and CLOSE it. When you S0C7, the log file will contain the record with the invalid field. Use an IF/THEN/ELSE/ENDIF JCL statement to optionally send that log file to your user if your job ABENDed. If your input file is large, you will pay a price by all the OPENs and CLOSEs.
_________________
....Terry
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities 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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group