View previous topic :: View next topic
|
Author |
Message |
srinathangya
New User
Joined: 19 Dec 2005 Posts: 77
|
|
|
|
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 |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
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 |
|
|
srinathangya
New User
Joined: 19 Dec 2005 Posts: 77
|
|
|
|
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 |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
The Legend
New User
Joined: 24 Dec 2005 Posts: 3 Location: Chennai
|
|
|
|
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 |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
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 |
|
|
srinathangya
New User
Joined: 19 Dec 2005 Posts: 77
|
|
|
|
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 |
|
|
Bitneuker
CICS Moderator
Joined: 07 Nov 2005 Posts: 1104 Location: The Netherlands at Hole 19
|
|
|
|
Like mmwife stated: redesign your system and make it idiot- and disasterproof |
|
Back to top |
|
|
srinathangya
New User
Joined: 19 Dec 2005 Posts: 77
|
|
|
|
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 |
|
|
shinepushpan
New User
Joined: 23 Jan 2006 Posts: 6
|
|
|
|
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 |
|
|
srinathangya
New User
Joined: 19 Dec 2005 Posts: 77
|
|
|
|
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 |
|
|
|