Moving the existing maps or virtual tables to a schema

Move the existing maps or virtual tables to a specific schema using the hlq.CNTL(AVZGNMPM) member. You can also use the standalone utility using the hlq.CNTL(AVZDMUT) member to move existing maps to a schema.

About this task

Move the existing maps or virtual tables to specific schemas using either the SYSIN statement in the hlq.CNTL(AVZGNMPM) member or the standalone utility in the hlq.CNTL(AVZDMUT) member.

Procedure

  1. Moving the maps using the SYSIN statement in the hlq.CNTL(AVZGNMPM) member. Use the SYSIN statements as follows:
    SYSIN DD *
    VT SCHEMA = ADD,NEW_SCHEMA
    MAP=NAMES_OF_MAPS_TO_PUT_IN_THIS_SCHEMA
    
    Note: Using the migration job with the same SOURCE and TARGET SSID, the virtual table is copied to the specified schema and the original map is also available in the default schema.
  2. Moving the maps using the standalone utility in the hlq.CNTL(AVZDMUT) member: You can run the standalone batch utility outside Data Virtualization Manager. Take your current map library and specify the schema map library that you want to use. Ensure that schema map library name matches with schema name that you defined when you created the schema. Any data that is not defined to be moved to the schema map library is transferred to the NEW_MAP_LIBRARY (refer to the sample job for details). This NEW_MAP_LIBRARY must be used in the JCL server's started task under the AVZMAPP DD name. Additionally, the original data set under AVZMAPP must be renamed and kept as a backup. If you want to revert the changes, point the AVZMAPP DD to the backup (the original CURRENT_MAP_LIBRARY). After completing the changes to the map data set, the server must be recycled.

    Use the instructions that are described in the job as follows:

    //STEP1 EXEC PGM=AVZDMUT,REGION=0M
    //STEPLIB DD DISP=SHR,DSN=&LOADLIB
    //SYSEXEC DD DISP=SHR,DSN=&REXXLIB
    //AVZMAPP DD DISP=SHR,DSN=CURRENT_MAP_LIBRARY
    //SCHEMAMP DD DISP=SHR,DSN=SCHEMA_MAP_LIBRARY
    //NEWMAPP DD DISP=SHR,DSN=NEW_MAP_LIBRARY
    //SYSPRINT DD SYSOUT=*
    //SYSIN DD *
    ADDSCHEMA SCHEMA_NAME
    MAPNAME
    MAPNAME
    /*

    You can use a single * (asterisk) as a wildcard to move multiple VTs between the schemas.

    For example,
    • TRADE* will move all the VT names starting with TRADE, such as TRADEXYZ, and TRADEABC;
    • *TRADE will move all the VT names irrespective of the text after *; and
    • TRA*DE* will search and move all the VTs with name TRA*DE because, the first wildcard from the right would be considered in case of multiple wildcards.
    Note: Only VSAM, SEQUENTIAL, VIEWS, ADABAS, DB2, IDMS and IMS VIEWS can be moved using the AVZDMUT) batch job.
  3. After performing the changes, recycle the server.