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]

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.

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...

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.

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...

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.

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.