Page 1 of 1

Alternate index and Base Cluster - confusion.

Posted: Mon Jul 15, 2013 6:42 pm
by Ramesh_Mainframe
Hi,

Why an alternate index cannot be defined on a base cluster coded with REUSE option.I searched but could not figure out the reason. Can anyone please provide me with an answer.

Thanks,

Re: Alternate index and Base Cluster - confusion.

Posted: Mon Jul 15, 2013 6:55 pm
by Robert Sample
The basic reason is that the Access Method Services for Catalogs manual tells you that you cannot:
When you create a reusable cluster, you cannot build an alternate index to support it. Also, you cannot create a reusable cluster with key ranges (see the KEYRANGE parameter). Reusable data sets can be multivolume and can have up to 123 physical extents.
However, a reusable cluster means (from the same manual) that
When a reusable cluster is opened, its high-used RBA is set to zero if you open it with an access control block that specifies the RESET attribute.
Since the alternate index is a completely separate physical file, if the cluster's high-used RBA is set to zero, how would all of the alternate index records be deleted?

Re: Alternate index and Base Cluster - confusion.

Posted: Wed Apr 30, 2014 4:43 pm
by Ramesh_Mainframe
That make sense but I've to read it multiple time to understand...I still don't understand this:
if the cluster's high-used RBA is set to zero, how would all of the alternate index records be deleted?

Re: Alternate index and Base Cluster - confusion.

Posted: Wed Apr 30, 2014 4:53 pm
by enrico-sorichetti
whenever updates are done to the base cluster
the alternate indexes involved are updated to keep everything in sync

resetting the HURBA to zero bypasses all the record processing ( is done at OPEN )
so the modules handling the sync are not involved

and You will be left in an unpredictable state

Re: Alternate index and Base Cluster - confusion.

Posted: Wed Apr 30, 2014 5:01 pm
by Robert Sample
Remember that an alternate index CANNOT be defined until there is at least one record in the base. If you set the high-used RBA to zero, you no longer have any records in the base -- so what happens to the alternate index records that were defined on that base?

Re: Alternate index and Base Cluster - confusion.

Posted: Fri May 02, 2014 8:37 pm
by Ramesh_Mainframe
Thanks Enrico.

Robert:
Robert Sample wrote:Remember that an alternate index CANNOT be defined until there is at least one record in the base. If you set the high-used RBA to zero, you no longer have any records in the base -- so what happens to the alternate index records that were defined on that base?
they are gone? :?

Re: Alternate index and Base Cluster - confusion.

Posted: Fri May 02, 2014 8:51 pm
by Robert Sample
You say they are gone -- but what deleted them? That conflict is why REUSE and alternate indexes are not compatible -- if allowed, the base cluster would be empty while the alternate index cluster contains the old data that was just deleted from the base. Again, the alternate index and base clusters are both physical files -- with data -- and hence things can be done to the base cluster that are not reflected in the alternate index.