Frank, What you are doing it logically correct. However, the structure of the VSAM KSDS after you OPEN and CLOSE it is different than when you insert and delete a record with a high key of X'FF'. The document "VSAM Demystified" http://www.redbooks.ibm.com/redbooks/pdfs/sg246105.pdf explains on page fifteen why you don't want to do this...excessive splits and poor space utilization result.
So your process is certainly correct, but not optimal for IMS indexes. Tom Harper IMS Utilities Development Team Neon Enterprise Software Sugar Land, TX -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Frank Swarbrick Sent: Thursday, March 26, 2009 10:46 AM To: [email protected] Subject: Re: initialize (reset) file On Thu, 26 Mar 2009 09:55:57 -0500, Tom Harper <[email protected]> wrote: >Frank, > >I should have explained that there is a reason for inserting the record >and then deleting it. When building the initial key for the VSAM KSDS >record for insertion and subsequent deletion, you should build a key of >all X'FF's. If you do not do this, then later, as subsequent keys are >inserted into the data set, performance is degraded. > >You mentioned also that you are doing this for indexes, and mentioned >VSAM ESDS data sets. Normally, IMS indexes are just VSAM KSDS data sets, >except when you have non-unique keys, and then the VSAM ESDS data sets >are required. If you a /SX to the secondary index key, then your keys >are unique and you can get rid of the VSAM ESDS data sets completely and >just have the VSAM KSDS data sets. Most customers have done this long >ago because the performance benefits are significant. Sorry, I thought I had looked at my define on my index and saw it was an ESDS. It is indeed a KSDS (how could it be otherwise!). I'm still confused about this performance degredation you mention. The "correct" (allegedly) process to restore an IMS database is do to an AMS DELETE/DEFINE of the index database cluster and then run DFSURGL0 to load the database. All I am doing is replacing the DELETE/DEFINE with my "VSAMINIT" process that just opens (for output) and closes the file. The DELETE/DEFINE doesn't do the insert/delete process (does it?). >You also might get some interesting responses if you post this question >to the IMS-LIST. I will do this. Thanks! Frank ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

