Accessing data through an IAM Alternate Index


Now that you have a base cluster defined and loaded, an Alternate Index defined and built, and a path defined, you are ready to start accessing your data via the path. Just as with VSAM, you need to allocate (dynamically or with a DD card) the path to the alternate index, open it and you are ready to begin. When your program opens the path, IAM dynamically allocates and opens  all of the necessary components of the Alternate Index sphere. For example, if you were to just be opening the path for read only access, IAM will dynamically allocate the alternate index and the base cluster data sets, open them, and set up the control blocks and routines necessary for your program to access the data. If the program opens up the path for update, then any associated upgradeable Alternate Indexes will also be dynamically allocated and opened. IAM will use the system generated DD names for the files that are dynamically allocated, which have the format SYSnnnnn. When you close the path, IAM will close and deallocate all of the component data sets that had been opened.

COBOL programmers, and users of programs written in the COBOL language are encouraged to review the COBOL Programming Guide for information on using alternate indexes and paths with COBOL programs. COBOL requires certain conventions for the DD names used in these circumstances that must be followed for proper functionality. The requirements that COBOL has for VSAM data sets must be followed with IAM data sets as well.

Because the DD names used to access the component IAM data sets in the alternate index sphere cannot be known in advance, the IAM override processor has been enhanced to handle specification of overrides by data set name (DSN=) in addition to the DD name. Using the DSN= parameter on an IAM ACCESS override is valid for any enhanced format IAM file. The DD= override can still be specified on other override cards, which can be intermixed with the new DSN= parameter. For more information about the IAM ACCESS overrides, see Processing-IAM-data-sets or IAM-ACCESS-Override-Statement-Format. An example of using a path, along with IAM ACCESS overrides by DSN= is shown below:

Example of JCL to use a path with IAM override

//UPDATAIX   EXEC   PGM=mypgm
//PATH       DD     DISP=SHR,DSN=example.iam.path
//IAMINFO    DD     SYSOUT=*
//IAMOVRID   DD     *
ACCESS       DSN=example.iam.base,MAXBUFNO=32
ACCESS       DSN=example.iam.aix,DYNDS=32
/*


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Storage IAM 11.0