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

UPDATING GDG genaration file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
che

New User


Joined: 31 Mar 2005
Posts: 6
Location: Chennai

PostPosted: Fri Jul 22, 2005 2:25 pm
Reply with quote

Problem goes like this

I am reading some data from a table and writing on to a generation of GDG.When write fails i keep track of the count and rewrite records to the same generation using restart logic.

say i have commit count = 10 and write fails in 14 th record.

how do i rewrite failed records as well as update records from 11.

Is it a good practice to do so.Suggestions are welcome.

Thanks in advance for all replies from fellow Forum mates.

36_2_35.gif 36_2_35.gif
Back to top
View user's profile Send private message
withnams

New User


Joined: 06 Jul 2005
Posts: 26
Location: Chennai

PostPosted: Fri Jul 22, 2005 3:46 pm
Reply with quote

Its not a good programming practise. The process is to commit after 'n' records and write those 'n' records into the file.
This way you can avoid the issue.
Back to top
View user's profile Send private message
che

New User


Joined: 31 Mar 2005
Posts: 6
Location: Chennai

PostPosted: Fri Jul 22, 2005 3:51 pm
Reply with quote

mr.chokalingam,

issue is whatif write fails in between. If u read the problem again u wud
have seen commit count is 10 records.

whatif write fails between 10 and 20. icon_question.gif


how do i write data on to the same generation with new fetch of data from the table. without deleting records already written.


36_2_35.gif
Back to top
View user's profile Send private message
nspreddy

New User


Joined: 29 Jul 2005
Posts: 1

PostPosted: Fri Jul 29, 2005 2:35 pm
Reply with quote

Pls clear abt this topic
Back to top
View user's profile Send private message
shivashunmugam Muthu

Active User


Joined: 22 Jul 2005
Posts: 114
Location: Chennai

PostPosted: Fri Jul 29, 2005 3:08 pm
Reply with quote

My suggestioin is

1. Create GDG new version with Disp as (Mod,Catlg,Keep)

2. Have 10 LRCL restart file with value as 000000000 & open it in I-O mode & update the counter (Commit-write) in the periodic interval.

3. Make the pgm to read restartfile, if its zero start process from 1. Else jus read infile till read count > commit count

Hope it shd works...

Correct me if I am wrong.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top