Alternate index and Base Cluster - confusion.

Virtual Storage Access method - ESDS, KSDS, RRDS & LDS. Basic direct access method, Basic sequential -, Queued sequential -, Basic partitioned -, Indexed sequential -, Object - access method.
Post Reply
Ramesh_Mainframe
Registered Member
Posts: 24
Joined: Thu Jul 11, 2013 6:28 pm
India

Alternate index and Base Cluster - confusion.

Post 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,
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Alternate index and Base Cluster - confusion.

Post 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?
Ramesh_Mainframe
Registered Member
Posts: 24
Joined: Thu Jul 11, 2013 6:28 pm
India

Re: Alternate index and Base Cluster - confusion.

Post 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?
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Alternate index and Base Cluster - confusion.

Post 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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Alternate index and Base Cluster - confusion.

Post 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?
Ramesh_Mainframe
Registered Member
Posts: 24
Joined: Thu Jul 11, 2013 6:28 pm
India

Re: Alternate index and Base Cluster - confusion.

Post 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? :?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Alternate index and Base Cluster - confusion.

Post 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.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “SMS & VSAM and BDAM, BSAM, QSAM, BPAM, ISAM, OAM.”