View previous topic :: View next topic
|
Author |
Message |
smadiraju
New User
Joined: 19 Dec 2008 Posts: 3 Location: Chennai
|
|
|
|
One of the program is abending very frquently.
I want to include a logic in the program such that it will write the error record into a file and continue with processing the next record.
Can anyone help me in getting a psuedo code to do such a change in PL1. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
By the time you're done coding this "bypass" endeavor, you could have debugged the problem.
This error should not be "masked" with a band aid.
You're going to have to fix it anyway, correct?
Bill |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
You have not provided anything that could let us help you. For example, what abend is the program getting? Handling a SB37 abend is quite different from handling a S0C7 abend.
Besides, as Bill said, it is a bad idea to mask abends -- they are occurring for a reason and you need to identify the underlying reason and fix it, not just change the code to ignore them. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
I agree with Bill.
In any case, if you're to cater for all possible abends, how can you be sure you've tested every case?
How do you know that it's a record that's causing the abend? It could be that the program logic is flawed.
Garry. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
smadiraju,
as you can imagine by now, you have not explained your problem very well.
actually, at all.
but I will take a wild guess.
you are encountering a S0C7.
you should include a process in you program,
that validates every field as to the datatype and acceptable values.
when you have a record which contains a field that violates this 'plausibility' proofing,
then exclude the record from the rest of the process and report the record.
I would suggest creating a new module,
which would run before the module that is abending,
and perform your exclusion process there,
and only output records containing 'good field values'.
this new module could even be a SORT utility
which would perform a copy, excluding (omit) records that violate your rules. |
|
Back to top |
|
|
|