Customizing the FSTAB Mapping Table and - 2

If you wish to define the Data Connect datasets and alternate indexes to be allocated, then you need to create the DDNAME/DSNAME cross reference table, FSTAB. The MFASFTAB member in the MFACNTL data set contains a job that you can user to create the FSTAB. The cross reference table converts filenames used in SELECT clauses in your COBOL application program to MVS dataset names or ddnames. In the COBOL program, you can assign a filename directly to an MVS ddname, an MVS dataset name or an entry requiring conversion by this table. If an entry is not found in the cross reference table, an assumption is made that the COBOL SELECT clause contains an MVS dataset name and dynamic allocation is attempted.

All entries in the table are optional. The table allows the following formats:

For short term dynamic allocation - dataset is freed at close:

FSTAB  'PC-NAME',DSN=MVS-DATASET-NAME
       [,MEM=MEMBNAME]   optional for PDS member name

For long term dynamic allocation - dataset freed at termination:

FSTAB  'PC-NAME',DSN=MVS-DATASET-NAME,DDN=DDNAME
       [,MEM=MEMBNAME]   optional for PDS member name

For long term allocation - //DDNAME in start-up JCL:

FSTAB  'PC-NAME',DDN=DDNAME

VSAM allocation adding alternate indexes:

FSTAB  'PC-NAME',DSN=MVS-DATASET-NAME,                 X
       AIX=(VSAM-AIX1,VSAM-AIX2,VSAM-AIX3)
Note:

COBOL application programs must define alternate indexes in the same order as they are defined in the table.

An exception to this rule is if the name is 1-8 characters without a period. In this case the name represents a member name in the dynamic allocation control file for new datasets (MFAVCTL). This enhancement to the MFA Data Connect Server is provided to remove the FSTAB requirement when using VSAM alternate indexes. This enhancement uses members in the MFAVCTL library to create dynamic FSTAB entries for VSAM files which have alternate indexes. Each member in the MFAVCTL library defines a VSAM file and its indexes. Only one VSAM file can be specified in each member. The control records within a member are 80 bytes long and begin with a keyword followed by its value. All member names for this facility must begin with a '$' or whatever keyboard character maps to a X'5C'. The keywords are VSAM= and AIXn=, when n is a value from 1 to 9. Following VSAM= is the MVS VSAM dataset name. This record must be the first record in the member. The keywords AIX1 through AIX9 identify the alternate index PATH files. They must be specified in the same order as in the COBOL program.

For example, in the COBOL program:

FILE-CONTROL.
 SELECT CLAIM-FILE ASSIGN TO PATCLMX
        ORGANIZATION IS INDEXED
        ACCESS IS RANDOM
        RECORD KEY IS PATIENT-CLIAM-NUMBER
        ALTERNATE RECORD KEY IS MEDICARE DUPLICATES
        ALTERNATE RECORD KEY IS MEDICAID-KEY DUPLICATES
        ALTERNATE RECORD KEY IS PRIVATE-INS-KEY DUPLICATES
        ALTERNATE RECORD KEY IS PATIENT-NAME
        ALTERNATE RECORD KEY IS CONTROL-NUMBER
        ALTERNATE RECORD KEY IS PAYMENT-ID
        STATUS IS VSAM-FILE-STATUS.

As an FSTAB entry:

FSTAB 'PATCLMX',
           DSN=CSI01V.PATCLM.PATIENT.BILLING,
           AIX=(CSI01V.PATCLM.BY.MEDICARE.PATH,
           CSI01V.PATCLM.BY.MEDICAID.PATH,
           CSI01V.PATCLM.BY.INS.POLICY.PATH,
           CSI01V.PATCLM.BY.NAME.PATH,
           CSI01V.PATCLM.BY.CONTROL.PATH,
           CSI01V.PATCLM.BY.PAYMENT.PATH) 

As a MFAVCTL library member:

VSAM=CSI01V.PATCLM.PATIENT.BILLING
AIX1=CSI01V.PATCLM.BY.MEDICARE.PATH
AIX2=CSI01V.PATCLM.BY.MEDICAID.PATH
AIX3=CSI01V.PATCLM.BY.INS.POLICY.PATH
AIX4=CSI01V.PATCLM.BY.NAME.PATH
AIX5=CSI01V.PATCLM.BY.CONTROL.PATH
AIX6=CSI01V.PATCLM.BY.PAYMENT.PATH

Assume that the name of the MFAVCTL member for the above control statements is $PATCLM6, then the MFEXTMAP.DAT entry would be: PATCLMX $PATCLM6. The above FSTAB and MFAVCTL member are functionally equivalent.