Fall back to VSAM

If you decide that you have to convert a migrated data set from DB2® back to VSAM, uses a 4-step procedure:

Step 1 - Unload the data from DB2

Run the VIDUNLOD program against the migrated data set. Because the data set has been migrated to DB2, enable the JCL to run under CICS VT. An example is shown in Figure 1.
Figure 1. Sample JCL to unload a file from DB2
//VIDUNLOD EXEC PGM=VIDUNLOD                      
//STEPLIB   DD DSN=appl.DRIVERS.LOAD,DISP=SHR    
//          DD DSN=VID.SVIDLODE,DISP=SHR 
//SYSPRINT  DD SYSOUT=*                            
//SYSUDUMP  DD SYSOUT=*                            
//FILEIN@   DD DSN=dummy.VSAM.dataset,DISP=SHR      
//FILEIN    DD SUBSYS=(ssi,DB2id,dimname)
//FILEOUT   DD DSN=vsam.file,DISP=SHR

The output data set FILEOUT will have an 8-byte prefix for KSDS files and a 12-byte prefix for RRDS files. In both cases, the first four bytes will be the file type (KSDS, RRDS, KSDV, or RRDV). The next four bytes will contain the length of the record, in binary format. For RRDS data sets, the next four bytes contain the relative record number. The remainder of the record will be the data.

Step 2 - Define the VSAM clusters

Use the IDCAMS utility to delete and define the base VSAM cluster.

Step 3 - Load the data to VSAM

Use the CICS VT batch utility program VIDLOADV to load the data from DB2 into a VSAM data set. Sample JCL is provided in the member VIDLOADV in VID.SVIDSAMP and is also shown in next:

Figure 2. Sample JCL to load VSAM file
 
//VIDLOADV  EXEC PGM=VIDLOADV        
//STEPLIB   DD DSN=VID.SVIDLODE,DISP=SHR   
//SYSPRINT  DD SYSOUT=*                             
//LOADIN    DD DSN=vsam.DB2unload,DISP=SHR
//LOADOUT   DD DSN=vsam.file,DISP=SHR

The steps in this fallback process can be combined into a single job to minimize the time it takes to fall back.

Step 4 - Define the alternate index and path cluster

Use the IDCAMS utility to define the alternate index cluster and path and build the alternate index path entries.

Step 5 - Remove the DIM from CICS and batch access

If you are falling back to VSAM temporarily, you can use the VTMM transaction to set the CICS® file migration status to INACT. Otherwise, remove the entry for this DIM from the CICS VT DST.

If you use AJF, add the DIM for the file to VIDFMSPX. Otherwise, reverse the JCL changes.


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/cvtugb0034.html