View previous topic :: View next topic
|
Author |
Message |
navneet.dewangan
New User
Joined: 09 Oct 2005 Posts: 22 Location: INDIA
|
|
|
|
Hi Sir,
I was asked that what will be the logic or what can be doen if a program abended and it was processing a VSAM file which is haveing 10000 records and it abended after reading and processing .then how will u start from the record it abended. Sir i am not geting write material to be good in vsam batch processing. plz send me some document if u have.
Thanks
Nvaneet |
|
Back to top |
|
|
rajandhla
Active User
Joined: 18 Oct 2005 Posts: 182 Location: Luton UK
|
|
|
|
I think there is no direct way to do it....
I think you have control in the code itself.What i feel is keep/store the key in a data item as the records processed, but write in separate file if the job gets abended i.e the current key otherwise write default value if the job completes successfully.
If the codes reads default value in the next run maintain the logic as it runs normally other wise goto the specific key and continue processing..
wait for other chaps to give their veiws..
regards
jai |
|
Back to top |
|
|
gskulkarni
New User
Joined: 01 Mar 2006 Posts: 70
|
|
|
|
Continuting on Jai's suggestion:
Code the program which reads the input file to have logic
1. Read an existing RESTART file which can be defined as VSAM access mode dynamic, optional (i.e. the file can be present or not present based on which iteration the step is running for)
2. If RESTART file is not present, read the input file from start.
3. If RESTART file is present, read the record from RESTART file.
4. Read record from INPUT file with START browsing at INFILE-KEY > RESTART-KEY.
5. Every time you read a record from input file, overwrite RESTART file's first record(Note that RESTART file will have only one record at a time).
Step5 will make sure that record at which it abended is stored in RESTART file and is avoided the next time in step 4. |
|
Back to top |
|
|
nallapureddy
New User
Joined: 27 Jul 2005 Posts: 18
|
|
|
|
if u don't want to chnge the logic in the progarm.Update the jcl such a way take a backup of the vsam file before executing the program.If the program abendd just restore the vsam file from the backup flat file or gdg and submit the job again |
|
Back to top |
|
|
navneet.dewangan
New User
Joined: 09 Oct 2005 Posts: 22 Location: INDIA
|
|
|
|
thanks jai for suggesting but i want to do it automatically i dont know the syntax for restart check point i am asking in that way. plz do repply me with actual syntax.
thanks
navneet |
|
Back to top |
|
|
rdr
New User
Joined: 26 May 2006 Posts: 35 Location: india
|
|
|
|
Hi,
1) Lets consider the file to be ESDS or KSDS
2) After reading each record move the key to some variable and check for any abend condition. Countinue this until EOF.
3) If any abend happens then restart the file using this key value.
Correct me if I am wrong...
Regards,
RDR. |
|
Back to top |
|
|
navneet.dewangan
New User
Joined: 09 Oct 2005 Posts: 22 Location: INDIA
|
|
|
|
I think we can use restart checkpoint |
|
Back to top |
|
|
|