Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Already written data in VSAM got deleted? How its possible?
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Fri Feb 27, 2015 2:46 pm    Post subject: Reply to: Already written data in VSAM got deleted? How its
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    Post subject: Reply to: Already written data in VSAM got deleted? How its
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Fri Feb 27, 2015 5:49 pm    Post subject: Reply to: Already written data in VSAM got deleted? How its
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 User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Fri Feb 27, 2015 8:15 pm    Post subject:
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: 7913
Location: Bellevue, IA

PostPosted: Fri Feb 27, 2015 8:21 pm    Post subject:
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: 258

PostPosted: Fri Feb 27, 2015 8:37 pm    Post subject: Reply to: Already written data in VSAM got deleted? How its
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts ODPP(Optim Data privacy Provider) Iss... Rama kishore IBM Tools 1 Mon Nov 07, 2016 5:46 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us