View previous topic :: View next topic |
Author |
Message |
munnabai Beginner
Joined: 17 Aug 2007 Posts: 3 Topics: 3
|
Posted: Sat Sep 20, 2008 3:41 am Post subject: Reg S0C7 abend handling |
|
|
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 |
|
 |
jsharon1248 Intermediate
Joined: 08 Aug 2007 Posts: 291 Topics: 2 Location: Chicago
|
Posted: Mon Sep 22, 2008 9:03 am Post subject: |
|
|
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 |
|
 |
Sqlcode Intermediate
Joined: 15 Dec 2006 Posts: 157 Topics: 38
|
|
Back to top |
|
 |
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Sun Sep 28, 2008 4:16 pm Post subject: |
|
|
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 |
|
 |
|
|