Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to avoid duplicate entry in my file.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
View previous topic :: :: View next topic  
Author Message
abdulrafi

Active User


Joined: 14 Sep 2009
Posts: 147
Location: Coimbatore

PostPosted: Fri Sep 21, 2012 10:42 pm    Post subject: How to avoid duplicate entry in my file.
Reply with quote

Hi,

A have a doubt regarding the checkpoint restart logic.

I have a program which needs to read every record from a DB2 table and load it into a PS file. I have the checkpoint logic in place. The logic is like for every 10 records fetched a checkpoint is taken. Consider that my file contains 100 records. My pgm has processed 10 records and the first checkpoint has been taken. Later when my pgm processed the next 5 records it got abended. Now totally there are 15 records written
into the file and I have 1 checkpoint in my hand which was taken after 10 records fetched.

Now I am giving the restart-id in the jcl to execute my pgm from the abended spot. When my pgm is executed i don want the records 11 to 15 to be read again which has been already read and updated in
the file. Considering my file is opened in extend mode so as to append the datas one below the other.

Currently it fetches from 11 as my checkpoint point was taken after 10 records were fetched and read. Because of which i am getting duplicate entry in my flat file which is not required.

Please assist me a way to eliminate duplicate record.
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Sep 21, 2012 11:10 pm    Post subject: Re: How to avoid duplicate entry in my file.
Reply with quote

abdulrafi wrote:
Hi,

A have a doubt regarding the checkpoint restart logic.

I have a program which needs to read every record from a DB2 table and load it into a PS file. I have the checkpoint logic in place. The logic is like for every 10 records fetched a checkpoint is taken. Consider that my file contains 100 records. My pgm has processed 10 records and the first checkpoint has been taken. Later when my pgm processed the next 5 records it got abended. Now totally there are 15 records written
into the file and I have 1 checkpoint in my hand which was taken after 10 records fetched.

Now I am giving the restart-id in the jcl to execute my pgm from the abended spot. When my pgm is executed i don want the records 11 to 15 to be read again which has been already read and updated in
the file. Considering my file is opened in extend mode so as to append the datas one below the other.

Currently it fetches from 11 as my checkpoint point was taken after 10 records were fetched and read. Because of which i am getting duplicate entry in my flat file which is not required.

Please assist me a way to eliminate duplicate record.


What does this have to do with IMS DB/DC?
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: Sat Sep 22, 2012 12:00 am    Post subject:
Reply with quote

Hello,

IMS or not, why does someone believe the records from 11 thru 15 should not be reprocessed?

When you issued the checkpoint after 10 iterations, that is your last valid checpoint - the last place from which you can successfully restart.

You need to study the basics of backup/restore checkpoint/restart. It appears you do not have this understanding.

At this late date, i suspect there is no checkpoint/restart needed. Simply backup the data before the update run and if there is an abend, reload from the backup and rerun from the beginning.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Sat Sep 22, 2012 12:07 am    Post subject: Re: How to avoid duplicate entry in my file.
Reply with quote

abdulrafi wrote:
Hi,

A have a doubt regarding the checkpoint restart logic.

I have a program which needs to read every record from a DB2 table and load it into a PS file.


If all you are doing is fetching from a table (note tables have rows not records) and writing to an output file worrying about a restart is a waste of time and resources!
Back to top
View user's profile Send private message
abdulrafi

Active User


Joined: 14 Sep 2009
Posts: 147
Location: Coimbatore

PostPosted: Tue Sep 25, 2012 5:09 pm    Post subject:
Reply with quote

Thanks for your help.
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 -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us