Deleting IAM Data Sets


IAM data sets that are not members of an alternate index sphere can be deleted through any manner used to delete non-VSAM data sets, and generally any manner to delete VSAM data sets. This includes through JCL disposition (DISP) processing, various ISPF panels, including the IAM panel, the TSO DELETE command, and the IDCAMS DELETE command.

The IAM DELETE function has been enhanced as part of the alternate index support to perform data set deletion in a manner that is compatible with VSAM. For example, when deleting a base cluster with alternate index and path associations, all of the associated data sets will be deleted. To use this function, a standard VSAM deletion be performed, rather than a non-VSAM scratch, particularly if the data sets reside on non-SMS managed volumes. Examples of VSAM deletion include the IDCAMS DELETE command, the TSO DELETE command, and the IAMISPF delete function. Examples of functions that use the non-VSAM scratch macro include the ISPF 3.2 and ISPF 3.4 function panels. Performing an ISPF 3.2 deletion of a component of an IAM alternate index sphere will just delete that single data set, and not the dependent associated data sets.

IDCAMS Delete

IAM will intercept any IDCAMS DELETE request to determine if the data set is IAM or VSAM. If the data set is an IAM data set, then IAM will issue the system services to perform the delete request. With this feature, existing IDCAMS job steps that issue DELETE commands do not have to be changed when converting data sets to IAM. IAM makes every attempt to follow an appropriate protocol to prevent the recalling of archived or migrated data sets that are being deleted. As with any expiration date protected data set, the PURGE keyword must be specified if the data set is so protected. The ERASE parameter on the DELETE CLUSTER is also honored by IAM.

One difference in delete processing from VSAM is that the data set must not be allocated to any other job or user, otherwise the delete will fail. This is because the deletion or scratch of a non-VSAM data set internally results in z/OS issuing an exclusive ENQ.

Example of Deleting an IAM Data set

In the example below, two IAM data sets are deleted with IDCAMS. The first one has the keyword CLUSTER specified explicitly, so IAM will handle the deletion. The second file is an IAM alternate index data set. Even though no type is specified, IAM will still process the delete request. In addition to the Alternate Index, IAM will delete any path data sets that are associated with the alternate index that is being deleted. Both files are allocated in JCL with a DISP=OLD, to ensure that this is the only job that is using those data sets. While those DD cards are not necessary, they may prevent deletion failures due to some other job having the data sets allocated.

Example of IDCAMS Delete of an IAM Data set (EX1082A)

    //DELETE   EXEC PGM=IDCAMS
   //SYSPRINT DD   SYSOUT=*
   //FILE1    DD   DSN=my.iam.dataset.file1,DISP=OLD
   //FILE2    DD   DSN=my.iam.dataset.aix,DISP=OLD
   //SYSIN    DD   *
    DELETE my.iam.dataset.file1 CLUSTER PURGE
    DELETE    my.iam.dataset.aix PURGE
   /*


 

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