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

Using EZtrieve to insert a record in a KSDS VSAM file


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rashmi123

New User


Joined: 04 Jun 2007
Posts: 25
Location: Pune

PostPosted: Tue Jun 05, 2007 9:26 am
Reply with quote

I am using EZtrieve to insert a record in a KSDS VSAM file. The new record which I am inserting is apperaing at the end. I want it to appear at the position based on the key value. How can this be done in EZtrieve?
The key comprises of the following:
WS-FIL-NUM1 1 3 P
WS-FIL-NUM2 4 3 P
WS-FIL-NUM3 7 10 P
WS-FIL-NUM4 17 3 P
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jun 05, 2007 2:38 pm
Reply with quote

rashmi123 wrote:
I am using EZtrieve to insert a record in a KSDS VSAM file. The new record which I am inserting is apperaing at the end. I want it to appear at the position based on the key value. How can this be done in EZtrieve?
If it is a keyed file, what are you using to see it not in keyed order?
Back to top
View user's profile Send private message
rashmi123

New User


Joined: 04 Jun 2007
Posts: 25
Location: Pune

PostPosted: Tue Jun 05, 2007 4:36 pm
Reply with quote

I am using File Master to view the VSAM file
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jun 05, 2007 4:55 pm
Reply with quote

I guess you may need to tell File Master that it is a keyed file and you want to see the records in key order.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 05, 2007 5:50 pm
Reply with quote

Hello,

Keep in mind that the physical record is not shoved into the middle of the file by key when you write/add a new record.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jun 05, 2007 5:59 pm
Reply with quote

Quote:
Keep in mind that the physical record is not shoved into the middle of the file by key when you write/add a new record.

I will have to disagree on that one .......... How else would we get CI/CA splits following inserts of new records.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Jun 05, 2007 6:03 pm
Reply with quote

I have to disagree also.....
The only way I can see this happening is the new record is somehow in a different CI/CA?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 05, 2007 7:18 pm
Reply with quote

Hello,

I'm not sure of all of the rules, but i believe that while keys are managed in "real time", not always the data. I may continue being mistaken, but i seem to recall that a dasd dump of some vsam files showed data records that were not stored in physical sequential order by key. When the key was used, the records were read in the correct sequence, but until a reorg or until vsam "caught up", they were stored out of order.

Again, i may well be mis-remembering - been more than just a little while and i have surrendered to losing things that are little used currently. . . icon_wink.gif

If the folks that use vsam a lot currently say it won't happen, i'll go with them icon_smile.gif
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
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