The two level retrieval when accessing record through its alternate index (i.e. first reading the alternate index and then reading the base cluster) discussed in the previous section would have resulted more coding on the part of the programmer when compared to reading a record with its prime key directly.

To avoid all the extra coding, the Access Method Services can be used to define a PATH between the base cluster and the associated alternate index cluster. A PATH is an entry in the VSAM catalog that establishes a logical link between an alternate index cluster and a base cluster. It does not contain any records; it just establishes a relationship.

Path and Alternate Index

Path and Alternate Index

Opening a data set by the path name opens both the alternate index and its associated base cluster. Then, if you want to read a record in the base cluster by using an alternate key value, it automatically fines the corresponding prime key value in the alternate index. No extra coding is required. You can have as many paths as you have alternate indexes

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

IBM Mainframe Topics