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

can i Rewrite the primary index of a vsam file


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
g.muralidhar

New User


Joined: 16 Nov 2005
Posts: 2

PostPosted: Fri Dec 16, 2005 11:57 pm
Reply with quote

Hi,
I have the record-layou like this

01 Author
02 book
05 page pic 9(2)
05 para pic 9(1)
02 index x(3)

here "02 book" is the primary key.I have open the file in I-O mode and read the file dynamically using the primary key and rewrite the primary key .Ofcourse the primary key will be left unique.

Is this possible..Please help me......
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Dec 18, 2005 5:43 am
Reply with quote

As I recall, you read the rec, make sure you can get at the data, delete it, move the new key in and write it.
Back to top
View user's profile Send private message
g.muralidhar

New User


Joined: 16 Nov 2005
Posts: 2

PostPosted: Sun Dec 18, 2005 12:31 pm
Reply with quote

Hi ,

Thanks for your reply.I will try the way you said and let you know furthur.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Dec 19, 2005 2:04 am
Reply with quote

One other thing. I read something on another site that reminded me: it's safer to write the new rec BEFORE you delete the old one.
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 -> COBOL Programming

 


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