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

About Restart Logic in VSAM-DB2 Program


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sudheer648

New User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Mon May 30, 2005 3:21 pm
Reply with quote

Hi,

When reading a VSAM file and updating database with information read from file in between if Job Abends how to Restart the Job

I Guess developer would place some logic in Program to handle such scienarios ...need inputs on this.
Back to top
View user's profile Send private message
pbgunasekar

New User


Joined: 28 May 2005
Posts: 26
Location: Chennai

PostPosted: Wed Jun 01, 2005 10:01 am
Reply with quote

hi sudheer,

i didnt work this please try this....

Create an dummy dataset and insert one dummy record in it ..in ur procedure division read this record and using start key place the point there and move the record to working storage and insert it into table...
Add one counter variable for every 1000 records give one commit before commit please write that last record in that dummy dataset....if u got any error read the last record in that dummy dataset and place that point in that dataset with start key...
please try it if any feedback pls inform me...
waiting guna




sudheer648 wrote:
Hi,

When reading a VSAM file and updating database with information read from file in between if Job Abends how to Restart the Job

I Guess developer would place some logic in Program to handle such scienarios ...need inputs on this.
Back to top
View user's profile Send private message
sudheer648

New User


Joined: 23 May 2005
Posts: 97
Location: Chennai

PostPosted: Wed Jun 01, 2005 10:20 am
Reply with quote

Hi guna,

Suppose if Job abended before atleast a commit point then how to handle the situation.

I think since commit is not reached the database would be rollback automatically.we need to start all from beginning.

Corrections are invited.
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 435
Location: chennai, India

PostPosted: Wed Jun 01, 2005 11:32 am
Reply with quote

Timestamp logic will sove this issue.
Back to top
View user's profile Send private message
ronie305

New User


Joined: 09 May 2005
Posts: 3

PostPosted: Wed Jun 01, 2005 4:47 pm
Reply with quote

this is a typical commit-restart logic....

have a table maintained holding info as:

pgm name
module name
time stamp
counter

when job abends restart from here... store last position where u had commited for restart position.

in sql u can specify : record > last commit position.
Back to top
View user's profile Send private message
pbgunasekar

New User


Joined: 28 May 2005
Posts: 26
Location: Chennai

PostPosted: Thu Jun 02, 2005 6:26 pm
Reply with quote

hello
i think this is the way .. my friend is working and told they r having one utility namely RESTART in that they register their program it atomatically restart the program where it got abends... i dont know exactly but he told me like this...pls enquire and give feedback
waiting
guna
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
Search our Forums:

Back to Top