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

Already written data in VSAM got deleted? How its possible?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Tanuz

New User


Joined: 04 Dec 2014
Posts: 5
Location: India

PostPosted: Fri Feb 27, 2015 2:01 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Feb 27, 2015 2:46 pm
Reply with quote

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
View user's profile Send private message
Tanuz

New User


Joined: 04 Dec 2014
Posts: 5
Location: India

PostPosted: Fri Feb 27, 2015 5:29 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Feb 27, 2015 5:49 pm
Reply with quote

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
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 582
Location: London

PostPosted: Fri Feb 27, 2015 8:15 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Feb 27, 2015 8:21 pm
Reply with quote

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
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Fri Feb 27, 2015 8:37 pm
Reply with quote

A job will not abend if no initiator is available. It will sit on the input queue.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top