Start of change

Making JCL changes before migration

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.

The 4th SUBSYS parameter

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.

Figure 1. JCL changes to enable CICS VT migration
//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  
		
You want to use AJF to prepare the JCL for CICS VT. The first step is to add a 4th parameter to the SUBSYS JCL statement defining a DD statement that references the existing Item Detail VSAM data set. This is shown in Figure 2.
Figure 2. JCL changes to enable AJF
//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  
		
You can specify any valid DD name as the 4th SUBSYS parameter, providing that it is unique within the job step.

The VIDFMSPX module

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.

Figure 3. Supplied sample VIDFMSPX source
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.

For example, the DD statement ITEMDET in Figure 2 specifies the DIM name VTITEM, which is the 3rd SUBSYS parameter. To direct applications programs to continue to access the VSAM data set, add the following statement to your VIDFMSPX source after the label VSAMONLY:
         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.

Managing the VIDFMSPX module

You should assemble and link VIDFMSPX into your CICS VT application drivers library. If you are deploying a single, system-wide application drivers library, you will have a single instance of VIDFMSPX and therefore you require a single point of control. If you have separate drivers libraries on an application by application basis, you can have multiple application level instances of VIDFMSPX.

AJF and DMF interoperablity

When you have migrated a VSAM file to DB2 using CICS VT and you are using AJF, you redirect application program VSAM calls to DB2 by removing the DIM from the VSAMONLY section of VIDFMSPX. You do not have to change your JCL. The presence of the 4th SUBSYS parameter causes CICS VT to test for the existence of the DIM in the VSAMONLY section. If the DIM name is not found, two further VIDFMSPX functions are evaluated. These are the labels DFMDFLT and DMFOVER in Figure 3.
  • DMFDFLT defines the default DMF action, and can be set to "Y" for yes or "N" for no.
  • DMFOVER defines an optional list of DIM names that override DFMDFLT.

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.

You do not have to remove the 4th SUBSYS parameter and specified DD name at the same time as you remove a DIM from the VSAMONLY section of VIDFMSPX providing that either of the following is true:
  1. DMFDFLT is "N" and the DIM name is not specified after the DMFOVER label.
  2. DMFDFLT is "Y" and the DIM name is specified after the DMFOVER label.
You must remove the 4th SUBSYS parameter and specified DD name before you finally delete the VSAM data set.

The order in which you specify DIM names after the DMFOVER label in VIDFMSPX is not significant.


Information Information

Feedback


Timestamp icon Last updated: Monday, 10 February 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic/com.ibm.cics.vt.doc//topics/cvtug_advanced_JCL_changes.html
End of change