View previous topic :: View next topic
|
Author |
Message |
Tanuz
New User
Joined: 04 Dec 2014 Posts: 5 Location: India
|
|
|
|
There is a job that runs every 30 min and write data in VSAM cluster.
In one of its run the job abended due to Time-Out. So we Kept the job on Hold.
Next day when the job was running, the job failed again. When verified the VSAM Cluster, the data of prevoius day was removed / deleted.
In previous day some data was processed and it should have data for that day.
How a data written to VSAM file can get deleted?
Note: There was no delete logic in job.
Please guide me in understanding what might have happened to the data in VSAM cluster. |
|
Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If a job abends, it is a good idea to fix the problem and re-run. Since it abended, there is no certainty that all the data at that point was actually on the dataset rather than sitting in a buffer waiting to be written. The VSAM dataset was not closed correctly, as indicated by your VERIFY.
You assumed magic would occur (abend in the step and everything OK with the output files, no need to do anything) and it doesn't.
Note, if you have multiple output files from the step that abended, you could easily be missing records from those as well, and not all the same records. |
|
Back to top |
|
 |
Tanuz
New User
Joined: 04 Dec 2014 Posts: 5 Location: India
|
|
|
|
Hi Bill,
The job is a NRT - Near Real Time Job, which runs every 30 mins.
1st Run - Some data was processed & written to VSAM Cluster.
2nd Run - Some data was processed & written to VSAM Cluster.
.
.
.
nth Run - Job abended, as no initiators was available.
Due to heavy load this job was kept on hold and was released in next day. As it is NRT job all unprocessed records should be processed in next run.
While trying to point the last unprocessed record the job failed, on verifying the cluster we found that all the data from 1st run to nth run of previous dat was lost.
I can understand if nth run data is lost, because it ended abnormally. But how the data of 1st to n-1 run data got deleted? |
|
Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Ah. So your abend wasn't an abend and your verify wasn't a VERIFY.
So you're saying all the data processed the previous day has disappeared, as though it had been restored to the previous day's final back-up?
I'd check to see whether it had been restored to the previous day's final back-up. |
|
Back to top |
|
 |
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 543 Location: London
|
|
|
|
Is the cluster defined with the REUSE attribute. If it is a load from a backup can overwrite what was already in the file. |
|
Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8683 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
How a data written to VSAM file can get deleted? |
It is possible that the buffers were NOT transferred to the data set when the time out occurred. In such a case, the program would indicate that data was written to the data set, but the data will not be in the data set since the buffers were never written. Hence nothing got deleted because the data was never in the data set to delete. Depending upon the record size and the buffer (block) size and the number of records written each time the program executes, the data may not get written to the data set for quite some time -- there are ways to get around this but the appropriate method would require discussing what you are doing with your site support group. |
|
Back to top |
|
 |
nevilh
Active User
Joined: 01 Sep 2006 Posts: 262
|
|
|
|
A job will not abend if no initiator is available. It will sit on the input queue. |
|
Back to top |
|
 |
|