CICS VSAM Transparency for z/OS, Version 1.2


Step 2 - Convert the unloaded data

Use the CICS® VT batch utility program VIDLOAD to convert the unloaded data set produced by the VIDUNLOD utility program into the correct format for the DB2® load utility.

Sample JCL for this utility can be found in member VIDLOAD in VID.SVIDSAMP, as follows:

Figure 1. Sample JCL for VIDLOAD
//VIDLOAD   EXEC PGM=VIDLOAD,PARM=dimname        
//STEPLIB   DD DSN=appl.drivers.load,DISP=SHR   
//          DD DSN=VID.SVIDLODE,DISP=SHR    
//SYSPRINT  DD SYSOUT=*                             
//LOADIN    DD DSN=appl.sequential.unload,DISP=SHR  
//LOADOUT   DD DSN=appl.sequential.db2load,UNIT=SYSDA,
//             DISP=(,CATLG,DELETE),RECFM=FB,LRECL=100,                
//             SPACE=(CYL,(25,5),RLSE) 
Note the following points about the VIDLOAD utility:

The record length for the DB2 load file must consider any data re-engineering that affects the length of the DB2 row. For example, assume your VSAM record length is 100 bytes and contains a 6 byte unsigned zoned decimal field mapped to a DEC(6,0) column. DEC(6,0) is 4 bytes, so the DB2 row is 2 bytes less than the VSAM record. If, however, your file has a 5-byte packed decimal date field mapped to a DATE column, which is 10 bytes in DB2, the row is 5 bytes longer than the VSAM record. The most reliable method to establish the length of the DB2 row is to review the load utility input statement, and add the length of the last column to its position. In Figure 2, the last column ITEM_DESCRIPTION is 35 bytes starting in position 50. The DB2 row length in this case is 84 bytes.

Figure 2. DB2 load statement
  LOAD DATA LOG NO INDDN SYSREC00 NOCOPYPEND                          
      INTO TABLE                                                      
      CIRDL.VID_ITEM                                                  
   (                                                                  
   ITEM_NUMBER                            POSITION(       1         ) 
   CHAR(                      6) ,                                    
   ITEM_NAME                              POSITION(       7         ) 
   CHAR(                     12) ,                                    
   ITEM_COLOUR                            POSITION(      19         ) 
   CHAR(                      6) ,                                    
   ITEM_WEIGHT                            POSITION(      25         ) 
   CHAR(                      4) ,                                    
   ITEM_COST                              POSITION(      29:      32) 
   DECIMAL                       ,                                    
   ITEM_REORDER_NO                        POSITION(      33         ) 
   SMALLINT                      ,                                    
   ITEM_SUPP_CODE                         POSITION(      35         ) 
   CHAR(                      3) ,                                    
   ITEM_DATE_FSHIP                        POSITION(      38         ) 
   DATE EXTERNAL(            10) ,                                    
   ITEM_SHELF_LIFE                        POSITION(      48         ) 
   CHAR(                      2) ,                                    
   ITEM_DESCRIPTION                       POSITION(      50         ) 
   CHAR(                     35) )                                      

The VIDLOAD utility issues the following message at the end of the job:

+VIDLOAD                                            
+VIDLOAD - DB2 LOADFILE FOR VSAM WRITTEN TO LOADOUT 
+VIDLOAD                                              




Last updated: December 6, 2013 20:43:7

Information Information

Feedback


Timestamp icon Last updated: Friday, 6 December 2013


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic///topics/cvtug_datamig_step2.html