IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to handle Abends while the Batch is running


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Mon Dec 19, 2005 3:20 pm
Reply with quote

Hi Guys,
I am having a problem like I am running, say a COBOL/DB2 Program whose task is to read a PS(Physical Sequential) and process it and wirite into another PS. Meanwhile, say I am getting S0c7 abend.
So,by this time some of the records might have been processed and copied to the destination.
Now the problem is how can I find howmany records have been processed and how to restart the Batch or continue from the last point where the program abended....
Actually I used RERUN LOGIC to handle this situation, but it gives control to the System Admin., and it waits for his reply... So I am not able to proceed...
What is the solution for this... Please help to overcome the problem...
Anyone in the realtime Env., pls., help me to sort out this problem...
Thanks,
[/b]
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Mon Dec 19, 2005 4:00 pm
Reply with quote

Hi srinathangya,
If u r getting S0C7 error then u try to resolve by reding the document from the below link

ibmmainframes.com/viewtopic.php?p=25846#25846

Quote:
how can I find howmany records have been processed and how to restart the Batch or continue from the last point where the program abended....

RERUN logic will take u to the system admin only.. since in ur case some records are being copied to the destination u may keep the checkpoint for some records and u can restart the job. so check for authorization for the RERUN and proceed.
Back to top
View user's profile Send private message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Mon Dec 19, 2005 4:24 pm
Reply with quote

Thanks a lot Khamrudin,
But my problem is different...
Let me explain my problem properly now...
I am having a batch program that runs for three consecutive days without any problem... but due to some false data, just take for example, I am getting s0c7 abend, now my program abends.(Also my batch program uses the concept of Dynamic file creation, for which I used the utility IKJEFTSR and IKJTSOEV programs), So I just want to know what will happen to the File dynamically allocated and to those group of records that were partly processed between the time the Checkpoint is taken and the Sytem crash? So, if U have a solution other than RERUN Logic...please mail me as early as possible.
Hope U understand my problem...now...
If U have a solution... pls., mail me..
Srinath...
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Mon Dec 19, 2005 8:27 pm
Reply with quote

Hi srinath,

i have not yet came in such a situation so i cannot give a right solution. plz moderators plz pay attention on srinath query..
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Dec 26, 2005 5:15 am
Reply with quote

Your problem results from poor system design. When I was growing up the rule was: a pgm should never abend w/an 0C7.

Files were edited before the system flow began and any recs containing invalid data were removed from the file and sent back for fixing.

As far as I know, if you want to restart a pgm from a point other than the beginning of the input files, you have to code the restart logic and restart setup logic yourself.
Back to top
View user's profile Send private message
The Legend

New User


Joined: 24 Dec 2005
Posts: 3
Location: Chennai

PostPosted: Tue Jan 03, 2006 3:18 am
Reply with quote

You can write a ABEND handle routine wherein you can write the last record that was processed in the SYSOUT.

I think this would solve your problem.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Fri Jan 13, 2006 8:13 pm
Reply with quote

In your dump you will, for each DDAME, find the last record read or written. This info is usually at the end part of your dump.
Back to top
View user's profile Send private message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Fri Jan 20, 2006 3:54 pm
Reply with quote

Thats very right... But Ur dealing only with S0C7, But I am talking in General...i.e, Abend might occur for many obvious reasons, we cant expection it will occur only due to data exception...The least possible error, take the example of power breakdown... In this case.. How will U restart from the point U left??? and how will U get the Intermediate or Temporary data that U have collected in Ur program while it was properly running???
This is the actual problem I am facing... So if U people have any idea.. pls., let me know...
Thanx,
Srinath.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Fri Jan 20, 2006 4:01 pm
Reply with quote

Like mmwife stated: redesign your system and make it idiot- and disasterproof icon_wink.gif
Back to top
View user's profile Send private message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Fri Jan 20, 2006 4:11 pm
Reply with quote

Ok leave it.. I have one more problem... I am using IKJEFSR Proc in my program to dynamically create datasets....and in the startup, I dont know howmany files I will be creating..... And Datasets will be created with the following naming convention...

abc0001
abc0002
abc0003
.
.
.
.
.
where abc- constant
0001,0002 are all sequence numbers...

So in the half a way the program is terminated... And when I again start the execution... I should check if the file already exist? If it exists, I should create a new file with succeeding seq. number..

How can I accomplish this???
If U know the answer pls., reply.. or else.. pls..pls......
Srinath.
Back to top
View user's profile Send private message
shinepushpan

New User


Joined: 23 Jan 2006
Posts: 6

PostPosted: Mon Jan 23, 2006 6:00 pm
Reply with quote

Your first issue was dealing with an abend in a step while batch is running : It's rather difficult to comment on the restarts without knowing exactly what your program & job is expected to do.
There could be two situations. One your PS file is updating data which is non-monetary in nature. If this is the case, better start the step all over again. (Off course after you have corrected your error.) If there are any GDG's make sure that proper amends are made.

If it's monetary, rerunning will result in double updates and I would suggest an overhaul of the design.

Your next issue : Why do you worry abt the files which are already allocated. Provide the disp as (New,Catlg,delete) and forget abt it.
Back to top
View user's profile Send private message
srinathangya

New User


Joined: 19 Dec 2005
Posts: 77

PostPosted: Wed Jan 25, 2006 11:35 am
Reply with quote

Hi frens..
Thanx for ur responses. Then as U all said I have redesigned my system altogether. The new method is working fine..
Thanx,
Srinath
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts Running a Job with the Default User ID JCL & VSAM 2
Search our Forums:

Back to Top