The following example maps the relationships between the COBOL FILE-CONTROL entry and the DD statements or environment variables for a VSAM indexed file that has two alternate indexes.
Using JCL:
//MASTERA DD DSNAME=clustername,DISP=OLD (1) //MASTERA1 DD DSNAME=path1,DISP=OLD (2) //MASTERA2 DD DSNAME=path2,DISP=OLD (3)
Using environment variables:
export MASTERA=DSN(clustername),OLD (1)
export MASTERA=DSN(path1),OLD (2)
export MASTERA=DSN(path2),OLD (3)
. . .
FILE-CONTROL.
SELECT MASTER-FILE ASSIGN TO MASTERA (4)
RECORD KEY IS EM-NAME
PASSWORD IS PW-BASE (5)
ALTERNATE RECORD KEY IS EM-PHONE (6)
PASSWORD IS PW-PATH1
ALTERNATE RECORD KEY IS EM-CITY (7)
PASSWORD IS PW-PATH2.
related tasks
Creating alternate indexes