Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Inserting new records and how they then display in File Mana

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Div Grad

New User


Joined: 08 Apr 2005
Posts: 43

PostPosted: Fri Oct 03, 2014 1:19 am    Post subject: Inserting new records and how they then display in File Mana
Reply with quote

I used a SPUFI to insert approx. 10,000 rows into a million row table. Then I used File Manager For z/OS (DB2) to eyeball my results. Everything looked good and then I slowly realized that my inserted records were always 21 rows apart as displayed.

I found that disconcerting because my belief is that the records come up sorted by key(s). So why would they be evenly spaced like that when I know the new keys are random? Looking closer I noticed that while all the old rows were coming up sorted on key(s) the new records I inserted were coming up as every 21st record within the old correctly sorted records. If I did an explicit sort on the keys then the new records were randomly spaced as expected.

So what is going on here, something analogous to blocking with flat files? I'm expecting a reorg overnight will eliminate this phenomenon.
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Fri Oct 03, 2014 1:52 am    Post subject:
Reply with quote

Div, What happens when you do a select query in a SPUFI by desc order with the keys and limit the result to may be 10k? if you did so then are you getting the same results as above?
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Fri Oct 03, 2014 5:30 pm    Post subject:
Reply with quote

Unless you do an explicit order by, what you 'see' is irrelevant in every way.

They way DB2 stores the data does not matter.

They way you see the data does not matter.

You may see something different after the reorg, you may not.

You may see something different after additional records are added or deleted, you may not.

Without an order by, the results are unpredictable. Period.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1278
Location: Belgium

PostPosted: Fri Oct 03, 2014 7:12 pm    Post subject:
Reply with quote

If you really want to know , read about pctfree and freepage
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
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us