IAM Override statement examples
The examples in this section are intended to help demonstrate how to use the IAM Override capability. There are other examples of using IAM Overrides throughout the space, as the various features and capabilities of IAM are presented.
Example 1: Define with override
The following example shows how an IAM Override statement is used during an IDCAMS DEFINE of an IAM file, to request the file's data records be compressed. The IAM file's DEFINE will use the attributes of an existing VSAM cluster.
Example of IAM Override on define
//SYSPRINT DD SYSOUT=*
//IAMOVRID DD *
CREATE DD=&ALLDD,DATACOMPRESS=YES
/*
//SYSIN DD *
DEFINE CLUSTER -
(NAME(CICS.MASTER.$IAM) -
MODEL(CICS.MASTER.CLUSTER) -
VOLUMES(MVS001) )
/*
Example 2: Multiple overrides on define
The following example shows an IDCAMS DEFINE of multiple IAM files, each with a different IAM Override values. As seen, this can easily be done through the use of the DSN parameter on the IAM Create Override statement.
The data set name “iam.master” will be a data compressed file, with Automatic Space Release turned off, due to anticipated file expansion. The data set's block size will be based on the IAM default value.
The data set named “iam.test” will use 1/2 track blocking, as indicated by the B=2 override. It will use the default for data compression and space release, as indicated in the IAM Options Table.
Example of Multiple overrides on IDCAMS Define of multiple data sets
//SYSPRINT DD SYSOUT=*
//IAMOVRID DD *
CREATE DSN=iam.master,DATACOMPRESS=YES,RELEASE=NO
CREATE DSN=iam.test,B=2
/*
//SYSIN DD *
DEFINE CLUSTER -
(NAME(iam.master) -
OWNER($IAM) ) -
CYLINDERS(100 20) -
FREESPACE(10 5) -
KEYS(24 8) -
RECORDSIZE(250 480) -
VOLUMES(IAM001) )
DEFINE CLUSTER -
(NAME(iam.test) -
OWNER($IAM) ) -
CYLINDERS(10 5) -
FREESPACE(10 5) -
KEYS(8 8) -
RECORDSIZE(100 1250) -
VOLUMES(IAM001) )
/*
Example 3: File Load Override
The following example demonstrates the use of an IAM Override for a file load, which is being done through IDCAMS. In particular, the CRBUFOPT override is specified to provide maximum buffering on the IAM file.
Example of overriding a file load
//SYSPRINT DD SYSOUT=*
//IAMINFO DD SYSOUT=*
//IAMOVRID DD *
CREATE DD=IAMFILE,CRBUFOPT=MCYL
/*
//IAMFILE DD DISP=OLD,DSN=my.iam.file
//INPUTFIL DD DSN=my.sequential.file,DISP=OLD,
// DCB=BUFNO=30
//SYSIN DD *
REPRO INFILE(INPUTFIL) OUTFILE (IAMFILE) REUSE
/*
Example 4: File LOAD SIMULATE
The following example demonstrates how to SIMULATE an IAM file LOAD that is utilizing IDCAMS REPRO.
Example of File LOAD Simulate
//SYSPRINT DD SYSOUT=*
//IAMINFO DD SYSOUT=*
//IAMOVRID DD *
CREATE DSN=your.iam.dataset.name,SIMULATE
/*
//SYSIN DD *
DEFINE CLUSTER
(NAME(your.iam.dataset.name) -
OWNER($IAM) ) -
CYLINDERS(5 0) -
FREESPACE(10 10) -
KEYS(24 8) -
RECORDSIZE(250 480) -
VOLUMES(IAM001) )
/* */
REPRO INDATASET(your.input.dataset) OUTDATASET(your.iam.dataset.name) REUSE
/*
//LISTCAT EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//IAMPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT DSN(your.iam.dataset.name) ALL
/*
//
This section provides more information about the following topics: