SAMPLIB member CBRSMB2, as shown here, performs the migration necessary
for the TAPEVOL table to add a column used for the IBM 3590-E1
x tape device.
//CBRSMB2 JOB MSGLEVEL=(1,1),MSGCLASS=A
//*********************************************************************
//*
//* $SEG(CBRSMB2) COMP(DBM) PROD(OAM):
//*
//* OAM DB2 Database Migration Jobs (for OAM Configuration
//* Database TAPEVOL Table).
//*
//* This job performs the migration of the TAPEVOL
//* table to the new version of the TAPEVOL table for
//* IBM 3590-E1x tape device support.
//*
//* It is recommended that you create a DB2 image copy of the
//* existing TAPEVOL table prior to running the CBRSMB2 job.
//*
//* ---------------------------------------------------------------
//*
//* Before running these jobs, you must change the following:
//*
//* 1. Change the name in the DSN SYSTEM(DB2) statement to
//* the name of the DB2 Subsystem in your installation.
//*
//* 2. Change the data set name in the RUN statement
//* LIB('DB2.RUNLIB.LOAD') phrase to the data set name used
//* in your installation for the DB2 RUNLIB.LOAD data set.
//*
//* 3. Change the PLAN name (DSNTIAxx) in the RUN statement to
//* match your current DB2 version and release level.
//*
//* ---------------------------------------------------------------
//*
//*
//* STEP DESCRIPTION
//* -------- -----------
//*
//* ALTERTVL - This step adds the new EPI column
//* to the TAPEVOL table.
//*
//* LABELTVL - This step provides the new label for the EPI column.
//*
//* CHANGTVL - This step sets the EPI field to 255 ('FF'X)
//* for each tape volume in the TAPEVOL table
//* which means the volume was added to the
//* OAM Tape Volume Table before the
//* IBM 3590-E1X tape device support.
//* NOTE:
//* A return code of 4 is expected from CHANGTVL step
//* because SQL issues a warning for an UPDATE statement
//* that does not include a WHERE clause.
//* (SQLSTATE = 01504)
//*
//* ---------------------------------------------------------------
//*
//*
//* CHANGE ACTIVITY:
//* $L0=OW38975 1E0 990611 TUCSPP: 3590-E1X TAPE DEVICE SUPPORT
//*
//*********************************************************************
//* Alter the TAPEVOL table to add the new EPI
//* column for 3590-E1X tape device support.
//*********************************************************************
//ALTERTVL EXEC PGM=IKJEFT01,DYNAMNBR=20
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DB2)
RUN PROGRAM(DSNTIAD) PLAN(DSNTIAxx) -
LIB('DB2.RUNLIB.LOAD')
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
ALTER TABLE TAPEVOL ADD EPI SMALLINT NOT NULL WITH DEFAULT;
COMMIT;
/*
//*********************************************************************
//* Place label on TAPEVOL table EPI column
//*********************************************************************
//LABELTVL EXEC PGM=IKJEFT01,DYNAMNBR=20,COND=(4,LT)
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DB2)
RUN PROGRAM(DSNTIAD) PLAN(DSNTIAxx) -
LIB('DB2.RUNLIB.LOAD')
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
LABEL ON TAPEVOL
(EPI IS 'EPI');
COMMIT;
/*
//*********************************************************************
//* Update the TAPEVOL table to set EPI value to 255 ('FF'X)
//* which means that the volume was added to the TAPEVOL table
//* before the 3590-E1X tape device support.
//*
//* Note: Since EPI is defined not null with default, it will
//* be set to 0 for all existing rows in the TAPEVOL table.
//* EPI = '00'X means that the volume is first written by
//* a native tape device (NOT in emulation mode).
//*********************************************************************
//CHANGTVL EXEC PGM=IKJEFT01,DYNAMNBR=20,COND=(4,LT)
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(DB2)
RUN PROGRAM(DSNTIAD) PLAN(DSNTIAxx) -
LIB('DB2.RUNLIB.LOAD')
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
UPDATE TAPEVOL
SET EPI = 255;
COMMIT;
/*