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
 

 

Way to rollback the data written into sequential file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ssivasub

New User


Joined: 14 May 2007
Posts: 4
Location: Chennai, India

PostPosted: Thu May 31, 2007 9:16 pm    Post subject: Way to rollback the data written into sequential file
Reply with quote

Hi,

Is there any way to rollback the data written into sequential file if the program abends in the middle. If yes, any syntax or in program we have to handle anything in the file declaration.

Can anyone help me out..

Sarav
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu May 31, 2007 9:37 pm    Post subject:
Reply with quote

Hello,

If you are writing to a sequential file and the job abends, a DISP=(NEW,CATLG,DELETE) will cause the "rtollback" as the file will be deleted bacause of the abend.

If this is not what you are looking for, please clarify and we will be able to offer suggestions.
Back to top
View user's profile Send private message
ssivasub

New User


Joined: 14 May 2007
Posts: 4
Location: Chennai, India

PostPosted: Fri Jun 01, 2007 9:54 am    Post subject:
Reply with quote

Hi,

My output file will be declared with DISP=(MOD,CATLG,CATLG) and my program is written with DB2 commit restart logic. For eg:

Suppose there are 10 records in input file. For every record once processing done , it will be written to output file. Once five records processed, it will do DB2 commits and 5th record will be written to restart table.

Now from 6th record onwards it will proceed to write to output file. But suppose if the job abends in the 8th record, then job will be restarted once again to start process from 6th records onwards since in the restart table you have last processed record is 5th record. Here the problem is 6 th and 7th records will be written to output file while 8th record abends. This I need to rollback in o/p file. Is it possible?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Jun 01, 2007 7:05 pm    Post subject:
Reply with quote

Hello,

One way to get what you want is to write the "new" data to a separate file. If there is an abend/rollback/restart, the program will have restart logic that tells it where to begin updating the database on the restart. The sequential output is re-created from the beginning during a restart. This is also a way to re-sync counters/reports that were lost during the abend.

When the step completes successfully, the "complete" new sequential file is MOD'ed onto the intended output file.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jun 01, 2007 7:14 pm    Post subject:
Reply with quote

Yes, I agree with Dick. The output should be written to a new file, and if a restart is required, you will have the option of using something like sort to eliminate any possible duplicates.
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 Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am


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