Defining IAM Data Sets with the IAM ISPF Panels
One of the easiest ways to allocate an IAM data set is through the IAM ISPF panels. They feature a fill in the blanks mechanism, along with providing easy specification of various IAM overrides all on one screen. To get to the IAM Define panel, select option I on the IAM Primary Option Menu panel. Be sure to fill-in the Data Set Name field and the Data Set Type field. Optionally, you can specify an existing IAM or VSAM data set as a model for the data set attributes.
Example of the IAM Primary Option Menu

IAM ISPF Define Panel
Once you click Enter, the Define an IAM File panel is displayed. If you had specified a MODEL data set, the information from the model is filled in on the definition panel, any of which can be changed. This panel includes the various parameters and attributes that can be specified for the file. Note that this panel displays the fully qualified data set name at the top left. The attributes essentially match those that must be specified on an IDCAMS Define Cluster request. The More: + on the top right of the display indicates that additional fields are available, and that you scroll down to see them. (The panel as shown is fully inclusive) Further down includes an area to specify the various IAM Overrides that affect the file definition. Once the necessary attributes are specified, click Enter to allocate the file. The data entered on the panel is highlighted text in the example.
IAM Data Set Define Panel (1 of 3)

IAM Data Set Define Panel (2 of 3)

IAM Data Set Define Panel (3 of 3)

If all the required parameters have been specified, and the allocation is successful, then the IAM Primary Option Menu will be re-displayed, with the status message in the top right corner. Note the highlighted feedback, which indicates that the IAM data set was successfully allocated. To verify that the file has been defined how you want it; click Enter to have the IAM data set attribute ISPF panel displayed.
IAM Data Set Define Confirmation

IAM File Characteristics Display
IAM responds with the IAM File Characteristics display, with the various attributes filled in. The format of the display is based on the format of the file being displayed. There are displays for IAM Enhanced format files, as seen below, a display for IAM Compatible format files, and a display for VSAM files.
IAM ISPF Data Set Attributes Display

Defining IAM Data Sets with the TSO Define Cluster Command
IAM data sets can also be defined with the TSO Define Cluster command. While this does not provide the same ease of use as the IAM ISPF panels, it is an option if the IAM ISPF panels have not been installed. This command essentially is identical to the IDCAMS Define Cluster command, with the same format and parameters. Some of the abbreviations may be slightly different. Refer to the IDCAMS Define section for information relating to the parameters required for IAM data sets. Also, you can issue the TSO command: "HELP DEFCL” to get the information about the TSO DEFINE CLUSTER command.
Remember that the data set name fields use the TSO naming conventions. The names will be prefixed unless enclosed within apostrophes.
Example of TSO Define Cluster
Example of a TSO Define Cluster Command for an IAM Data Set

TSO responds with the following messages:
TSO Response to Define Cluster Command

After the file has been defined, you can use the TSO LISTCAT ALL command to see the file attributes. The following example shows how to issue the LISTCAT and the results.
Example TSO LISTCAT Command
TSO LISTCAT ALL Output
As a result of the LISTCAT ALL, IAM produces what is called an IAMPRINT Report, which is written directly to the TSO terminal, which is followed by the standard IDCAMS SYSPRINT output. Refer to the section on IAM Reports for complete details on the IAMPRINT Report.
TSO LISTCAT Output (1 of 2)

TSO LISTCAT Output (2 of 2)

Defining IAM Data Sets with the TSO ALLOC Command
IAM files can also be defined with the TSO ALLOC Command. This is similar to defining IAM files through JCL. This command provides far fewer specifications than the DEFINE Command, allowing only the basic essentials to be specified. The ALLOC Command has the same parameters as added to the JCL DD card: RECORG, LRECL, KEYLEN, and KEYOFF. The use of a DATACLAS will add a few more fields, such as share options and free space. The highlighted text indicates the command and the operands. For complete information on the ALLOC command, use HELP ALLOC.
Example of TSO ALLOC Command

The ALLOC Command will either respond with error messages, or return with no messages at all, which indicates success. As with the prior DEFINE CLUSTER Command, you can issue a LISTCAT ALL just to validate the allocation.
Summary
As you can see, there are several methods available for defining IAM files. The most common method is to use the IDCAMS DEFINE CLUSTER command, however, there are other choices. The other methods include through JCL DD cards, or through various mechanisms under TSO. The key ingredient is that you have to indicate that the file is to be an IAM file instead of a VSAM file. This is done by using OWNER($IAM), or by placing $IAM within the data set name, or by using a DATACLAS or STORCLAS with $IAM in the class name. For many files, this is the only change required to use IAM instead of VSAM.