It is possible to make the batch JCL changes described earlier in this chapter in advance of migrating a VSAM file to DB2®. Your application programs continue to access the VSAM data set although the JCL has been changed for CICS® VT access. This is referred to as the advanced JCL change facility, or AJF.
Using AJF, the time and effort to switch to DB2 access immediately after the data is migrated is reduced. Instead of having to make the JCL changes at the same time as you migrate the VSAM data, you can separate migration preparation activities, such as JCL modification, from data migration activities. You direct CICS VT to access the data either in VSAM or in DB2 through a combination of a 4th SUBSYS JCL parameter and the user-controlled program VIDFMSPX.
The 4th SUBSYS parameter is used by two CICS VT functions, AJF and the batch dual mode facility (DMF). You must review DMF for batch programs to understand how to enable and control AJF and DMF.
Assume that you have a batch program called ORD0105 that reads two VSAM files, Item Detail and Audit. You are using CICS VT to migrate your Item Detail VSAM file. Figure 1 shows the JCL changes to enable CICS VT to access the migrated Item Detail file.
//jobcard
//STEP5 EXEC PGM=ORD0105
//STEPLIB DD DSN=appl.prog.lib,DISP=SHR
// DD DSN=appl.DRIVERS.LOAD,DISP=SHR
// DD DSN=VID.SVIDLODE,DISP=SHR
//ITEMDET DD SUBSYS=(ssi,db2id,VTITEM)
//ITEMDET@ DD DSN=ITEMDT.VID.DUMMY,DISP=SHR
//AUDIT DD DSN=AUDIT.VSAM.FILE,DISP=SHR
//jobcard
//STEP5 EXEC PGM=ORD0105
//STEPLIB DD DSN=appl.prog.lib,DISP=SHR
// DD DSN=appl.DRIVERS.LOAD,DISP=SHR
// DD DSN=VID.SVIDLODE,DISP=SHR
//ITEMDET DD SUBSYS=(ssi,db2id,VTITEM,ITEMDVSM)
//ITEMDET@ DD DSN=ITEMDET.VID.DUMMY,DISP=SHR
//ITEMDVSM DD DSN=ITEMDET.VSAM.FILE,DISP=SHR
//AUDIT DD DSN=AUDIT.VSAM.FILE,DISP=SHR
The second step to enable AJF involves the user controlled module VIDFMSPX. Sample source and assemble/link JCL is provided in my.SVIDCNFG.custom member VIDGFMX. The source is shown in Figure 3.
VIDFMSPX CSECT
VIDFMSPX AMODE 31
VIDFMSPX RMODE ANY
VERIFY DC CL8'VIDFMSPX'
DC A(VSAMONLY)
DC A(DMFDFLT)
DC A(DMFOVER)
*
VSAMONLY DS 0H
* LIST OF DIMS TO BE PROCESSED IN VSAMONLY MODE
* DC CL8'VIDKSDS'
VSAMEND DC XL8'FFFFFFFFFFFFFFFF'
*
DMFDFLT DS 0H
* SYSTEM DEFAULT DMF SWITCH - 'Y' = ON AND 'N' = OFF
DC CL1'N'
*
DMFOVER DS 0H
* LIST OF DIMS TO OVERRIDE DMFDFLT
* DC CL8'VIDKSDS'
DMFEND DC XL8'FFFFFFFFFFFFFFFF'
*
END
When you provide the 4th SUBSYS DD statement and a batch application program attempts to open the file, CICS VT loads VIDFMSPX. To use AJF and direct your applications to continue to access the VSAM data set, you must add the file DIM name to VIDFMSPX after the VSAMONLY label in Figure 3.
DC CL8'VTITEM'
In conjunction with the 4th SUBSYS parameter, the
statement DC CL8'VTITEM' in VIDFMSPX will
direct application program VSAM calls to the DD statement ITEMDVSM,
which specifies the VSAM data set name. This is confirmed by the
following message, which is written to the joblog when a program
opens the VSAM file: VIDSS250 SUBSYSTEM NAME=VIDZ VSAM ONLY FOR DDNAME=ITEMDET
Note that message VIDSS250 refers to the DD name that your application program uses to process the VSAM file, and not the DD name you specify in the 4th SUBSYS parameter.
The order in which you specify DIM names after the VSAMONLY label in VIDFMSPX is not significant.
DMF is not a production facility and the recommended value for DFMDFLT in a production system is "N". In a test system, a default of "Y" is appropriate if you are using DMF to support your CICS VT migration project.
The order in which you specify DIM names after the DMFOVER label in VIDFMSPX is not significant.