Appendix D. Merge in place: Migrating the data 237
Example: D-3 SQL query to retrieve information about databases
-- Query against SAPR3.ZMCOD_DATABASE
-- used in SG24-6914
select
ZM.SRCSSID as ZM_SRCSSID ,
ZM.SRCDBNAME as ZM_SRCDBNAME ,
ZM.SRCSCHEMA as ZM_SRCSCHEMA ,
ZM.SRCSTOGROUP as ZM_SRCSTOGROUP ,
ZM.SRCRELEASE as ZM_SRCRELAESE ,
ZM.TRGSSID as ZM_TRGSSID ,
ZM.TRGDBNAME as ZM_TRGDBNAME ,
ZM.TRGSCHEMA as ZM_TRGSCHEMA ,
ZM.TRGSTOGROUP as ZM_TRGSTOGROUP ,
ZM.TRGRELEASE as ZM_TRGRELAESE
from
SAPR3.ZMCOD_DATABASE as ZM
order by
ZM_SRCDBNAME
$ZMCINSR
The SQL query $ZMCINSR, as shown in Example D-4, can be used as the input
member of the REXX procedure PQUERYTB to retrieve information related to
the indexes.
Example: D-4 SQL query to retrieve information about indexes
-- Query against SAPR3.ZMCOD_DATABASE and SAPR3.ZMCOD_INDEXES
-- used in SG24-6914
select
IN.SRCDBNAME as ZM_SRCDBNAME ,
IN.SRCINDEXSPACE as ZM_SRCINDEXSPACE ,
IN.SRCPART as ZM_SRCPART ,
IN.SRCINDEX as ZM_SRCINDEX ,
IN.SRCSCHEMA as ZM_SRCSCHEMA ,
IN.SRCSSID as ZM_SRCSSID ,
IN.SRCDBID as ZM_SRCDBID ,
IN.SRCSPACE as ZM_SRCSPACE ,
IN.SRCISOBID as ZM_SRCISOBID ,
IN.SRCIPREFIX as ZM_SRCIPREFIX ,
IN.SRCPRIQTY as ZM_SRCPRIQTY ,
IN.SRCSTOGROUP as ZM_SRCSTOGROUP ,
IN.SRCVCAT as ZM_SRCVCAT ,
IN.TRGINDEX as ZM_TRGINDEX ,
IN.TRGINDEXSPACE as ZM_TRGINDEXSPACE ,
IN.TRGSCHEMA as ZM_TRGSCHEMA ,
DB.TRGDBNAME as ZM_TRGDBNAME ,

Get SAP on DB2 Universal Database for OS/390 and z/OS: Multiple Components in One Database (MCOD) now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.