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 can i start with 51st record for next time

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
pathuri.anji
Warnings : 2

New User


Joined: 05 Dec 2007
Posts: 1
Location: bangalore

PostPosted: Thu Jan 31, 2008 2:10 pm    Post subject: How can i start with 51st record for next time
Reply with quote

Hi,


I have a question related to db2 tables

Q) I have a table with 100 records.while reading the records i got

abend at 50th record then how can i start with 51st record for next time?

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

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Thu Jan 31, 2008 2:13 pm    Post subject: db2 answer
Reply with quote

keep track of how many rows (record is term that relates to files/ row is the term for DB2) you process during the run and insure this counter/place-marker is available each time your program runs.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Thu Jan 31, 2008 5:54 pm    Post subject:
Reply with quote

This is restart philosophy.

you have not mentioned the activity/process you are executing.

It can become complicated based on:
  • if you update the rows and have no commit, then you need to start at the beginning after an ABEND. (do not confuse ABEND with a non-zero SQLCODE, they are not the same.)
  • if you have a commit interval, your counter would be based on the point of last commit
  • if you have an output file, you may or may not need to use OPEN output extend when you recognize a restart process
  • normally, each shop has some type of 'RESTART' table which contains indicators as to counts, whether this is restart or fresh start


Basically, you need an external (from the program - like restart table) source to tell your program if it is a fresh start or a restart. you need to have logic to start your db2 process at the proper place as well as positioning any output vsam/qsam files.

lot depends on if this is batch or online. what I have described is a batch restart process.
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. 00D3003B - time outs in DB2 when invo... chavinash2004 DB2 2 Mon Oct 09, 2017 4:39 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 10 Tue Sep 05, 2017 4:24 pm

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