z/OS DFSMS OAM Planning, Installation, and Storage Administration Guide for Object Support
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


CBRSMERG

z/OS DFSMS OAM Planning, Installation, and Storage Administration Guide for Object Support
SC23-6866-00

SAMPLIB member CBRSMERG, as shown here, assists you in merging the OAM configuration databases (OCDBs) for use with DB2 data sharing in an OAMplex. Running CBRSMERG might not be the only way of performing this task. Use a method that best suits the requirements for your environment. All warnings, prerequisites, or recommendations apply regardless of the method that is used to perform this merge. If you choose to use this sample job, you must modify and run the job successfully before you use OAM.
//CBRSMERG JOB MSGLEVEL=(1,1),MSGCLASS=A
//*********************************************************************
//*
//*  $SEG(CBRSMERG) COMP(DBM) PROD(OAM):
//*
//*  OAM DB2 Database Merge Job (combining OAM configuration
//*  databases from multiple systems)
//*
//*  ---------------------------------------------------------------
//*  ---------------------------------------------------------------
//*
//*  CBRSMERG
//*
//*  This job is intended to assist in the task of merging OAM
//*  configuration databases for use with DB2 data sharing in an
//*  OAMplex environment.
//*  DFSMS 1.5.0 provides OAM support in a parallel sysplex
//*  environment using XCF communications and DB2 data sharing.
//*
//*
//*  This job will:
//*   1. Load data from other system (DB2 data from other
//*      system's DB2 tables) into this system's OAM's tables.
//*
//*******************************************************************
//*
//*  Before running this job, you MUST obtain the following:
//*    - load the information from the OAM configuration tables
//*      from the other OAM/system where data is to be copied from
//*      onto a dataset on this system
//*      The simplest way to do this is to do an SQL SELECT * from
//*      the OAM configuration database tables on the other systems
//*      and editing the column headers out of the resulting output
//*      so that just the data from the rows remains.
//*    - Note the beginning and ending columns where the data
//*      resides for each column in the table rows.
//*
//*******************************************************************
//*
//*  It is recommended that you create a DB2 image copy of the
//*  existing tables:
//*    OAM configuration database tables:
//*       OLIBRARY
//*       DRIVE
//*       VOLUME
//*       TAPEVOL
//*       DELOBJT
//*       SLOT
//*  These tables will be modified directly by this job, so a
//*  backup copy is necessary in case recovery is needed.
//*
//*******************************************************************
//*
//*  Before running this job, you must change the following:
//*
//*    1.Change the PARM='DB2' in the JOB STEP statements to
//*      the name of the DB2 Subsystem in your installation.
//*
//*    2.Change the data set name SYS1.DB2.V4R1M0.SDSNLOAD
//*      in the STEPLIB statements to the data set name used
//*      for the DB2 SDSNLOAD dataset, if necessary.
//*
//*    3.Change RESUME YES to RESUME NO if you are loading
//*      into empty tables.
//*
//*    4.Change the data set names in the CBRSMERx steps to
//*      the appropriate data set names for loading the DB2
//*      tables from other systems (this sample job is set up
//*      as though datasets are pre-allocated):
//*
//*      smerge.map      = map dataset for DB2 in the job (reused
//*                        in this job, or can use separate data
//*                        sets for each job step if desired
//*      smerge.err      = error dataset for DB2 in the job (reused
//*                        in this job, or can use separate data
//*                        sets for each job step if desired
//*
//*      input.libtable  = DSN with the OLIBRARY table row values
//*                        from the system to be merged
//*      workdsn.forlib  = work dataset for DB2 in job step
//*      sortdsn.forlib  = sort dataset for DB2 in job step
//*      discard.forlib  = DSN for the output of rows that could
//*                        not be merged from the other system
//*
//*      input.slttable  = DSN with the SLOT table row values
//*                        from the system to be merged
//*      workdsn.forslot = work dataset for DB2 in job step
//*      sortdsn.forslot = sort dataset for DB2 in job step
//*      discard.forslot = DSN for the output of rows that could
//*                        not be merged from the other system
//*
//*      input.drvtable  = DSN with the DRIVE table row values
//*                        from the system to be merged
//*      workdsn.fordrv  = work dataset for DB2 in job step
//*      sortdsn.fordrv  = sort dataset for DB2 in job step
//*      discard.fordrv  = DSN for the output of rows that could
//*                        not be merged from the other system
//*
//*      input.deltable  = DSN with the DELOBJT table row values
//*                        from the system to be merged
//*      workdsn.fordelo = work dataset for DB2 in job step
//*      sortdsn.fordelo = sort dataset for DB2 in job step
//*      discard.fordelo = DSN for the output of rows that could
//*                        not be merged from the other system
//*
//*      input.voltable  = DSN with the VOLUME table row values
//*                        from the system to be merged
//*      workdsn.forvol  = work dataset for DB2 in job step
//*      sortdsn.forvol  = sort dataset for DB2 in job step
//*      discard.forvol  = DSN for the output of rows that could
//*                        not be merged from the other system
//*
//*      input.tvoltable = DSN with the TAPEVOL table row values
//*                        from the system to be merged
//*      workdsn.fortvol = work dataset for DB2 in job step
//*      sortdsn.fortvol = sort dataset for DB2 in job step
//*      discard.fortvol = DSN for the output of rows that could
//*                        not be merged from the other system
//*
//*      **NOTE: For these datasets, use size calculations that
//*              would be needed for your installation, using the
//*              DB2 guidelines in the DB2 Command and Utility
//*              Reference for the LOAD utility.
//*
//*    5.Change the POSITION(xx:yy) in the CBRSMER* job steps to
//*      correlate to the actual beginning, (and ending if needed),
//*      columns where the data for each column resides in the input
//*      datasets (the SYSREC DD statement dataset).
//*
//*    6.The integer fields are set up as EXTERNAL(zz) in the job
//*      steps, be sure that any integer values in the columns that
//*      are not the full length are padded with preceding zeros
//*      in the input dataset (the SYSREC DD statement dataset).
//*
//*******************************************************************
//*
//*  After running this job, do the following:
//*
//*    1.Check the return codes from the job to verify success
//*      or failure of the data merge.
//*
//*    2.Check the data sets below for any rows that could not
//*      be merged into the configuration database.  The most
//*      likely cause of failure would be duplicate rows.
//*
//*      discard.forlib  = DSN for the output of rows that could
//*                        not be merged from the other system
//*
//*      discard.forslot = DSN for the output of rows that could
//*                        not be merged from the other system
//*
//*      discard.fordrv  = DSN for the output of rows that could
//*                        not be merged from the other system
//*
//*      discard.fordelo = DSN for the output of rows that could
//*                        not be merged from the other system
//*
//*      discard.forvol  = DSN for the output of rows that could
//*                        not be merged from the other system
//*
//*      discard.fortvol = DSN for the output of rows that could
//*                        not be merged from the other system
//*
//*********************************************************************
//*
//*  CHANGE ACTIVITY:
//*    $L0=HDZ11E0  150 970812 TUCLJT: Initial Release
//*    $P1=K1B0989  R1B 090306 TUCBLC: Added new columns (EPI,     @P1A
//*                                    BKTYPE,OUNITNAME, DATACLAS, @P1A
//*                                    DSNFMT,SUBLEVEL, CAPACITYO, @P1A
//*                                    FREESPACEO, NUMLKBWO,       @P1A
//*                                    NUMPKBWO, NUMLKBDEO)        @P1A
//*
//*
//*********************************************************************
//*********************************************************************
//*  Load configuration tables from different DB2 database
//*********************************************************************
//CBRSMER1 EXEC PGM=DSNUTILB,DYNAMNBR=20,COND=(4,LT),PARM='DB2',
//         REGION=4096K
//STEPLIB  DD DSN=SYS1.DB2.V4R1M0.SDSNLOAD,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSREC   DD DSN=input.libtable,DISP=(OLD,KEEP)
//SYSUT1   DD DSN=workdsn.forlib,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK

//SORTOUT  DD DSN=sortdsn.forlib,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSDISC  DD DSN=discard.forlib,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSMAP   DD DSN=smerge.map,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK   //SYSERR   DD DSN=smerge.err,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSPRINT DD SYSOUT=*
//UTPRINT  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN    DD *

 LOAD DATA INDDN(SYSREC)
      RESUME YES
      INTO TABLE OLIBRARY
    (NAME       POSITION(xx)  CHAR(8),
     ONLINE     POSITION(xx)  CHAR(1),
     OPERATNL   POSITION(xx)  CHAR(1),
     PATHSTAT   POSITION(xx)  CHAR(1),
     COMMAND    POSITION(xx)  CHAR(5) DEFAULTIF(COMMAND=''),
     PRIMCTC    POSITION(xx)  CHAR(4) DEFAULTIF(PRIMCTC=''),
     PRIMPORT   POSITION(xx)  CHAR(1) DEFAULTIF(PRIMPORT=''),
     ALTCTC     POSITION(xx)  CHAR(4) DEFAULTIF(ALTCTC=''),
     ALTPORT    POSITION(xx)  CHAR(1) DEFAULTIF(ALTPORT=''),
     FAULT      POSITION(xx)  CHAR(3) DEFAULTIF(FAULT=''),
     OLIBTYPE   POSITION(xx)  CHAR(1),
     NUMSLOTS   POSITION(xx)  INTEGER EXTERNAL(3),
     NUMESLOT   POSITION(xx)  INTEGER EXTERNAL(3),
     NUMDRVS    POSITION(xx)  INTEGER EXTERNAL(3),
     RCOMMAND   POSITION(xx)  CHAR(5) DEFAULTIF(RCOMMAND=''),
     DEVTYPE    POSITION(xx)  CHAR(8) DEFAULTIF(RCOMMAND=''),
     LIBRDES    POSITION(xx:yy)  CHAR DEFAULTIF(LIBRDES=''),
     CLIBRARY   POSITION(xx)  CHAR(8) DEFAULTIF(CLIBRARY=''),
     MEDIATYP   POSITION(xx)  CHAR(8) DEFAULTIF(MEDIATYP=''),
     LIBINDEX   POSITION(xx)  INTEGER EXTERNAL(1),
     PLIBRARY   POSITION(xx)  CHAR(16) DEFAULTIF(MEMBER=''),
     MEMBER     POSITION(xx)  CHAR(8) DEFAULTIF(PLIBRARY=''))
/*
//*********************************************************************
//CBRSMER2 EXEC PGM=DSNUTILB,DYNAMNBR=20,COND=(4,LT),PARM='DB2',
//         REGION=4096K
//STEPLIB  DD DSN=SYS1.DB2.V4R1M0.SDSNLOAD,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSREC   DD DSN=input.slttable,DISP=(OLD,KEEP)
//SYSUT1   DD DSN=workdsn.forslot,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SORTOUT  DD DSN=sortdsn.forslot,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSDISC  DD DSN=discard.forslot,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSMAP   DD DSN=smerge.map,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSERR   DD DSN=smerge.err,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSPRINT DD SYSOUT=*
//UTPRINT  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN    DD *

 LOAD DATA INDDN(SYSREC)
      RESUME YES
      INTO TABLE SLOT
    (NAME       POSITION(xx)  CHAR(3),
     OLIBRARY   POSITION(xx)  CHAR(8),
     OCCUPIED   POSITION(xx)  CHAR(1),
     OPERATNL   POSITION(xx)  CHAR(1),
     VOLSER0    POSITION(xx)  CHAR(6) DEFAULTIF(VOLSER0=''),
     VOLSER1    POSITION(xx)  CHAR(6) DEFAULTIF(VOLSER1=''))
 /*
//*********************************************************************
//CBRSMER3 EXEC PGM=DSNUTILB,DYNAMNBR=20,COND=(4,LT),PARM='DB2',
//         REGION=4096K
//STEPLIB  DD DSN=SYS1.DB2.V4R1M0.SDSNLOAD,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSREC   DD DSN=input.drvtable,DISP=(OLD,KEEP)
//SYSUT1   DD DSN=workdsn.fordrv,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SORTOUT  DD DSN=sortdsn.fordrv,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSDISC  DD DSN=discard.fordrv,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSMAP   DD DSN=smerge.map,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSERR   DD DSN=smerge.err,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSPRINT DD SYSOUT=*
//UTPRINT  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN    DD *

 LOAD DATA INDDN(SYSREC)
      RESUME YES
      INTO TABLE DRIVE
    (NAME       POSITION(xx)    CHAR(8),
     OLIBRARY   POSITION(xx)    CHAR(8),
     CTC        POSITION(xx)    CHAR(4),
     SCSI       POSITION(xx)    CHAR(1),
     LUN        POSITION(xx)    CHAR(1),
     ONLINE     POSITION(xx)    CHAR(1),
     OPERATNL   POSITION(xx)    CHAR(1),
     LDRIVENO   POSITION(xx)    CHAR(1) DEFAULTIF(LDRIVENO=''),
     DRIVTYPE   POSITION(xx)    CHAR(1),
     DEVTYPE    POSITION(xx)    CHAR(8) DEFAULTIF(DEVTYPE=''),
     DRIVEDES   POSITION(xx:yy) CHAR DEFAULTIF(DRIVDES=''),
     DRIVENUM   POSITION(xx)    INTEGER EXTERNAL(1),
     MEMBER     POSITION(xx)    CHAR(16) DEFAULTIF(MEMBER=''))
 /*
//*********************************************************************
//CBRSMER4 EXEC PGM=DSNUTILB,DYNAMNBR=20,COND=(4,LT),PARM='DB2',
//         REGION=4096K
//STEPLIB  DD DSN=SYS1.DB2.V4R1M0.SDSNLOAD,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSREC   DD DSN=input.voltable,DISP=(OLD,KEEP)
//SYSUT1   DD DSN=workdsn.forvol,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SORTOUT  DD DSN=sortdsn.forvol,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSDISC  DD DSN=discard.forvol,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSMAP   DD DSN=smerge.map,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSERR   DD DSN=smerge.err,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSPRINT DD SYSOUT=*
//UTPRINT  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN    DD *

 LOAD DATA INDDN(SYSREC)
      RESUME YES
      INTO TABLE VOLUME
    (VOLSER     POSITION(xx)  CHAR(6),
     OVOLSER    POSITION(xx)  CHAR(6),
     LOCATION   POSITION(xx)  CHAR(1),
     SLOT       POSITION(xx)  CHAR(3),
     OLIBRARY   POSITION(xx)  CHAR(8),
     SHELFLOC   POSITION(xx)  CHAR(32),
     MNTDATE    POSITION(xx)  DATE EXTERNAL(10),
     WRTDATE    POSITION(xx)  DATE EXTERNAL(10),
     EXPDATE    POSITION(xx)  DATE EXTERNAL(10),
     EJECTDAT   POSITION(xx)  DATE EXTERNAL(10),
     LASTDATA   POSITION(xx)  INTEGER EXTERNAL(1),
     LASTVTCL   POSITION(xx)  INTEGER EXTERNAL(1),
     LASTVTCP   POSITION(xx)  INTEGER EXTERNAL(1),
     VOLUMESET  POSITION(xx)  CHAR(8),
     TYPE       POSITION(xx)  CHAR(1),
     ORIENT     POSITION(xx)  CHAR(1),
     FULL       POSITION(xx)  CHAR(1),
     READABLE   POSITION(xx)  CHAR(1),
     WRITABLE   POSITION(xx)  CHAR(1),
     WRTPROT    POSITION(xx)  CHAR(1),
     OWNERP     POSITION(xx)  CHAR(1),
     OWNER      POSITION(xx)  CHAR(32),
     FRESPACE   POSITION(xx)  INTEGER EXTERNAL(7),
     DELSPACE   POSITION(xx)  INTEGER EXTERNAL(1),
     DELCOUNT   POSITION(xx)  INTEGER EXTERNAL(1),
     FRAGIDX    POSITION(xx)  INTEGER EXTERNAL(1),
     MEDIATYP   POSITION(xx)  CHAR(2),
     CREDATE    POSITION(xx)  DATE EXTERNAL(10),
     ERRSTAT    POSITION(xx)  INTEGER EXTERNAL(1),
     VOLEMPTY   POSITION(xx)  CHAR(1),
     RECOUNT    POSITION(xx)  INTEGER EXTERNAL(1),
     CAPACITY   POSITION(xx)  INTEGER EXTERNAL(7),
     PLIBRARY   POSITION(xx)  CHAR(8),
     MEMBER     POSITION(xx)  CHAR(16))
 /*
//*********************************************************************
//CBRSMER5 EXEC PGM=DSNUTILB,DYNAMNBR=20,COND=(4,LT),PARM='DB2',
//         REGION=4096K
//STEPLIB  DD DSN=SYS1.DB2.V4R1M0.SDSNLOAD,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSREC   DD DSN=input.deltable,DISP=(OLD,KEEP)
//SYSUT1   DD DSN=workdsn.fordelo,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SORTOUT  DD DSN=sortdsn.fordelo,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSDISC  DD DSN=discard.fordelo,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSMAP   DD DSN=smerge.map,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSERR   DD DSN=smerge.err,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSPRINT DD SYSOUT=*
//UTPRINT  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN    DD *
 LOAD DATA INDDN(SYSREC)
      RESUME YES
      INTO TABLE DELOBJT
    (COLNAME    POSITION(xx)  CHAR(44),
     OBJNAME    POSITION(xx)  CHAR(44),
     VOLSER     POSITION(xx)  CHAR(6),
     VTOCTOKN   POSITION(xx)  INTEGER EXTERNAL(1),
     OBJSIZE    POSITION(xx)  INTEGER EXTERNAL(6))
 /*
//*********************************************************************
//CBRSMER6 EXEC PGM=DSNUTILB,DYNAMNBR=20,COND=(4,LT),PARM='DB2',
//         REGION=4096K
//STEPLIB  DD DSN=SYS1.DB2.V4R1M0.SDSNLOAD,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSREC   DD DSN=input.tvoltble,DISP=(OLD,KEEP)
//SYSUT1   DD DSN=workdsn.fortvol,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SORTOUT  DD DSN=sortdsn.fortvol,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSDISC  DD DSN=discard.fortvol,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSMAP   DD DSN=smerge.map,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSERR   DD DSN=smerge.err,DISP=(MOD,KEEP),UNIT=3390,
//         VOL=SER=DBPACK
//SYSPRINT DD SYSOUT=*
//UTPRINT  DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN    DD *

 LOAD DATA INDDN(SYSREC)
      RESUME YES
      INTO TABLE TAPEVOL
    (VOLSER     POSITION(xx)     CHAR(6),
     UNITNAME   POSITION(xx)     CHAR(8),
     MEDIATYP   POSITION(xx)     CHAR(2),
     STORGRP    POSITION(xx)     CHAR(8),
     TYPE       POSITION(xx)     CHAR(1),
     CREDATE    POSITION(xx)     DATE EXTERNAL(10),
     MNTDATE    POSITION(xx)     DATE EXTERNAL(10),
     WRTDATE    POSITION(xx)     DATE EXTERNAL(10),
     EXPDATE    POSITION(xx)     DATE EXTERNAL(10),
     CAPACITY   POSITION(xx)     INTEGER EXTERNAL(8)
     FRESPACE   POSITION(xx)     INTEGER EXTERNAL(8)
     LSTBLKID   POSITION(xx)     INTEGER EXTERNAL(8)
     PFULL      POSITION(xx)     INTEGER EXTERNAL(2),
     NUMLBLKS   POSITION(xx)     INTEGER EXTERNAL(8)
     NUMLKBW    POSITION(xx)     INTEGER EXTERNAL(8)
     NUMPKBW    POSITION(xx)     INTEGER EXTERNAL(8)
     NUMLKBDE   POSITION(xx)     INTEGER EXTERNAL(8)
     FULL       POSITION(xx)     CHAR(1),
     READABLE   POSITION(xx)     CHAR(1),
     WRITABLE   POSITION(xx)     CHAR(1),
     INUSE      POSITION(xx)     CHAR(1),
     COPIED     POSITION(xx)     CHAR(1),
     AVOLSER    POSITION(xx)     CHAR(6),
     COMPACT    POSITION(xx)     CHAR(1),
     MEMBER     POSITION(xx)     CHAR(16));
     EPI        POSITION(xx)     INTEGER EXTERNAL(2),
     BKTYPE     POSITION(xx)     CHAR(1),
     OUNITNAM   POSITION(xx)     CHAR(8),
     DATACLAS   POSITION(xx)     CHAR(8),
     DSNFMT     POSITION(xx)     CHAR(1),
     SUBLEVEL   POSITION(xx)     CHAR(1),
     CAPACITYO  POSITION(xx)     INTEGER EXTERNAL(8),
     FRESPACEO  POSITION(xx)     INTEGER EXTERNAL(8),
     NUMLKBWO   POSITION(xx)     INTEGER EXTERNAL(8),
     NUMPKBWO   POSITION(xx)     INTEGER EXTERNAL(8),
     NUMLKBDEO  POSITION(xx)     INTEGER EXTERNAL(8))
/*

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014